Skip to content

Commit 6dc1970

Browse files
committed
make resend button actually resent the email
1 parent 4a682ec commit 6dc1970

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • web/src/pages/user-profile/UserProfilePage/tabs/ProfileDetailsTab/modals/EmailMfaSetupModal

web/src/pages/user-profile/UserProfilePage/tabs/ProfileDetailsTab/modals/EmailMfaSetupModal/EmailMfaSetupModal.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ const ModalContent = () => {
9494
},
9595
});
9696

97+
const { mutate: resendEmail, isPending: isResending } = useMutation({
98+
mutationFn: api.auth.mfa.email.init,
99+
});
100+
97101
const form = useAppForm({
98102
defaultValues,
99103
validationLogic: formChangeLogic,
@@ -172,7 +176,8 @@ const ModalContent = () => {
172176
<Button
173177
variant="outlined"
174178
text={m.modal_mfa_enable_email_resend()}
175-
onClick={() => {}}
179+
loading={isResending}
180+
onClick={() => resendEmail()}
176181
/>
177182
</div>
178183
</ModalControls>

0 commit comments

Comments
 (0)