Skip to content

The Open Source DocuSign Alternative.

fix: update the dialog cancel to reset

Brayden Brayden6f958b9320a3
diff --git a/apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx b/apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx
index e3120141a..487ebfc32 100644
--- a/apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx
+++ b/apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx
@@ -202,7 +202,7 @@ export const EnableAuthenticatorAppDialog = ({
variant="secondary"
onClick={() => {
onOpenChange(false);
- setupTwoFactorAuthenticationForm.setValue('password', '');
+ setupTwoFactorAuthenticationForm.reset();
}}
>
Cancel
diff --git a/apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx b/apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx
index 376a8939c..649cbd11c 100644
--- a/apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx
+++ b/apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx
@@ -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>