fix: update the dialog cancel to reset

This commit is contained in:
Brayden Brayden
2024-03-10 09:28:08 +00:00
parent f646fa29d7
commit 6f958b9320
2 changed files with 9 additions and 2 deletions

View File

@ -202,7 +202,7 @@ export const EnableAuthenticatorAppDialog = ({
variant="secondary"
onClick={() => {
onOpenChange(false);
setupTwoFactorAuthenticationForm.setValue('password', '');
setupTwoFactorAuthenticationForm.reset();
}}
>
Cancel

View File

@ -138,7 +138,14 @@ export const ViewRecoveryCodesDialog = ({ open, onOpenChange }: ViewRecoveryCode
/>
<DialogFooter>
<Button type="button" variant="secondary" onClick={() => onOpenChange(false)}>
<Button
type="button"
variant="secondary"
onClick={() => {
onOpenChange(false);
viewRecoveryCodesForm.reset();
}}
>
Cancel
</Button>