We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bda4b8 commit d7832dbCopy full SHA for d7832db
1 file changed
apps/frontend/src/modules/song-upload/components/client/context/UploadSong.context.tsx
@@ -321,6 +321,14 @@ export const UploadSongProvider = ({
321
};
322
}, [formMethods.formState.isDirty, isUploadComplete]);
323
324
+ // Reset form and store state when component unmounts
325
+ useEffect(() => {
326
+ return () => {
327
+ formMethods.reset();
328
+ store.reset();
329
+ };
330
+ }, []);
331
+
332
const formContextValue: UploadSongFormContextType = {
333
formMethods,
334
register,
0 commit comments