diff --git a/apps/meteor/client/components/TwoFactorModal/TwoFactorEmailModal.tsx b/apps/meteor/client/components/TwoFactorModal/TwoFactorEmailModal.tsx index 19074f7f6b34..12526fdd6c66 100644 --- a/apps/meteor/client/components/TwoFactorModal/TwoFactorEmailModal.tsx +++ b/apps/meteor/client/components/TwoFactorModal/TwoFactorEmailModal.tsx @@ -45,6 +45,17 @@ const TwoFactorEmailModal = ({ onConfirm, onClose, emailOrUsername, invalidAttem }; const id = useUniqueId(); + const onCloseHandler = () => { + try { + if (typeof onClose === 'function') { + onClose(); + // Change the URL without triggering a full page reload + window.location.href = 'http://localhost:3000'; + } + } catch (error) { + console.error('Error in onClose function:', error); + } + }; return ( {t('Invalid_password')}} - + {t('Cloud_resend_email')}