mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
fix: add conditional to useEffects
This commit is contained in:
@ -150,8 +150,10 @@ export const EnableAuthenticatorAppDialog = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Reset the form when the Dialog open state changes
|
// Reset the form when the Dialog closes
|
||||||
|
if (!open) {
|
||||||
setupTwoFactorAuthenticationForm.reset();
|
setupTwoFactorAuthenticationForm.reset();
|
||||||
|
}
|
||||||
}, [open, setupTwoFactorAuthenticationForm]);
|
}, [open, setupTwoFactorAuthenticationForm]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -93,8 +93,10 @@ export const ViewRecoveryCodesDialog = ({ open, onOpenChange }: ViewRecoveryCode
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Reset the form when the Dialog open state changes
|
// Reset the form when the Dialog closes
|
||||||
|
if (!open) {
|
||||||
viewRecoveryCodesForm.reset();
|
viewRecoveryCodesForm.reset();
|
||||||
|
}
|
||||||
}, [open, viewRecoveryCodesForm]);
|
}, [open, viewRecoveryCodesForm]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user