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" variant="secondary"
onClick={() => { onClick={() => {
onOpenChange(false); onOpenChange(false);
setupTwoFactorAuthenticationForm.setValue('password', ''); setupTwoFactorAuthenticationForm.reset();
}} }}
> >
Cancel Cancel

View File

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