-
Completed
- {completedRecipients.map((recipient: Recipient) => (
-
-
-
-
{recipient.email}
-
- {RECIPIENT_ROLES_DESCRIPTION[recipient.role].roleName}
-
-
-
- ))}
+
+ {completedRecipients.length > 0 && (
+
+
Completed
+ {completedRecipients.map((recipient: Recipient) => (
+
+
+
+
{recipient.email}
+
+ {RECIPIENT_ROLES_DESCRIPTION[recipient.role].roleName}
+
+
- )}
-
- {waitingRecipients.length > 0 && (
-
-
Waiting
- {waitingRecipients.map((recipient: Recipient) => (
-
- ))}
-
- )}
-
- {openedRecipients.length > 0 && (
-
-
Opened
- {openedRecipients.map((recipient: Recipient) => (
-
- ))}
-
- )}
-
- {uncompletedRecipients.length > 0 && (
-
-
Uncompleted
- {uncompletedRecipients.map((recipient: Recipient) => (
-
- ))}
-
- )}
+ ))}
-
-
-
+ )}
+
+ {waitingRecipients.length > 0 && (
+
+
Waiting
+ {waitingRecipients.map((recipient: Recipient) => (
+
+ ))}
+
+ )}
+
+ {openedRecipients.length > 0 && (
+
+
Opened
+ {openedRecipients.map((recipient: Recipient) => (
+
+ ))}
+
+ )}
+
+ {uncompletedRecipients.length > 0 && (
+
+
Uncompleted
+ {uncompletedRecipients.map((recipient: Recipient) => (
+
+ ))}
+
+ )}
+
+
);
};
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 27560c073..d7a8f6553 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
@@ -1,4 +1,4 @@
-import { useMemo } from 'react';
+import { useEffect, useMemo } from 'react';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
@@ -149,6 +149,13 @@ export const EnableAuthenticatorAppDialog = ({
}
};
+ useEffect(() => {
+ // Reset the form when the Dialog closes
+ if (!open) {
+ setupTwoFactorAuthenticationForm.reset();
+ }
+ }, [open, setupTwoFactorAuthenticationForm]);
+
return (