From 34ee1e8cb1b3ecd3f27003d10ae89b62591dec2a Mon Sep 17 00:00:00 2001 From: Kai Rohwer Date: Mon, 25 Nov 2024 13:17:22 +0100 Subject: [PATCH] Refactor ProcessExportModal to use string type for selectedOptions and handleOptionSelectionChange --- src/management-system-v2/components/process-export.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/management-system-v2/components/process-export.tsx b/src/management-system-v2/components/process-export.tsx index dd74ad178..86fa5854f 100644 --- a/src/management-system-v2/components/process-export.tsx +++ b/src/management-system-v2/components/process-export.tsx @@ -3,7 +3,6 @@ import React, { useEffect, useState } from 'react'; import { Modal, Checkbox, Radio, RadioChangeEvent, Space, Flex, Divider, Tooltip } from 'antd'; -import type { CheckboxValueType } from 'antd/es/checkbox/Group'; import { useEnvironment } from './auth-can'; import { exportProcesses } from '@/lib/process-export'; @@ -107,9 +106,7 @@ const ProcessExportModal: React.FC = ({ setSelectedType(preselectedExportType); }, [preselectedExportType]); - const [selectedOptions, setSelectedOptions] = useState( - ['metaData'].concat(pdfOptions), - ); + const [selectedOptions, setSelectedOptions] = useState(['metaData'].concat(pdfOptions)); const [isExporting, setIsExporting] = useState(false); const [pngScalingFactor, setPngScalingFactor] = useState(1.5); @@ -120,7 +117,7 @@ const ProcessExportModal: React.FC = ({ setSelectedType(value); }; - const handleOptionSelectionChange = (checkedValues: CheckboxValueType[]) => { + const handleOptionSelectionChange = (checkedValues: string[]) => { setSelectedOptions(checkedValues); };