Compare commits

...

1 Commits

Author SHA1 Message Date
03e6388968 chore: added form reset for onCancel
Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
2024-03-08 23:25:02 +05:30
2 changed files with 20 additions and 2 deletions

View File

@ -197,7 +197,16 @@ export const EnableAuthenticatorAppDialog = ({
/> />
<DialogFooter> <DialogFooter>
<Button type="button" variant="secondary" onClick={() => onOpenChange(false)}> <Button
type="button"
variant="secondary"
onClick={() => {
setupTwoFactorAuthenticationForm.reset({
password: '',
});
onOpenChange(false);
}}
>
Cancel Cancel
</Button> </Button>

View File

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