diff --git a/ui/src/components/ExitModal/ExitModal.tsx b/ui/src/components/ExitModal/ExitModal.tsx index 1b756eee..31ae93d1 100644 --- a/ui/src/components/ExitModal/ExitModal.tsx +++ b/ui/src/components/ExitModal/ExitModal.tsx @@ -14,11 +14,18 @@ import { } from '@chakra-ui/react'; import { useNavigate } from 'react-router-dom'; import ExitWarningImage from '@/assets/images/ExitWarning.png'; +import useConnectorFormStore from '@/stores/useConnectorFormStore'; const ExitModal = (): JSX.Element => { const { isOpen, onOpen, onClose } = useDisclosure(); + const { resetAllFormData } = useConnectorFormStore(); const navigate = useNavigate(); + const handleSetupExit = () => { + resetAllFormData(); + navigate('*'); + }; + return ( <>