From f4abfd4279c9f72a6c140d43e630848f73158be5 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Sat, 17 Jan 2026 12:54:16 +0700 Subject: [PATCH] refactor(FE): Dismiss toast notifications on unmount --- .../pages/production/recording/form/RecordingForm.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/pages/production/recording/form/RecordingForm.tsx b/src/components/pages/production/recording/form/RecordingForm.tsx index 0995f27f..d7f913e8 100644 --- a/src/components/pages/production/recording/form/RecordingForm.tsx +++ b/src/components/pages/production/recording/form/RecordingForm.tsx @@ -237,6 +237,12 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { ); const [duplicateErrorShown, setDuplicateErrorShown] = useState(false); + useEffect(() => { + return () => { + toast.dismiss(); + }; + }, []); + const approveModal = useModal(); const rejectModal = useModal(); const deleteModal = useModal();