From 01603a7ced01bec1e5cf91f47a206aab86bd0908 Mon Sep 17 00:00:00 2001 From: Anshuman Sathua Date: Mon, 23 Oct 2023 00:38:00 +0530 Subject: [PATCH 1/5] notification bug fixed for resend verification --- modules/auth/resendVerification.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/auth/resendVerification.tsx b/modules/auth/resendVerification.tsx index 363b66d68..3f7fec3d2 100644 --- a/modules/auth/resendVerification.tsx +++ b/modules/auth/resendVerification.tsx @@ -33,7 +33,7 @@ function ResendVerification() { return; } - notify({ message: error.message, type: 'error' }); + notify({ message: error.message, type: 'error', theme: 'light' }); }; const { mutate: resendVerify, isLoading: isUserSigningUp } = useAuthMutation(resendVerification, { From 14b6ab15ac36bba5674efe22635cf4b65353315d Mon Sep 17 00:00:00 2001 From: Dave Date: Sun, 22 Oct 2023 20:17:11 +0100 Subject: [PATCH 2/5] removed error toast from success block in forgot password, and changed error handling for changeEmail from using message to using status code --- modules/auth/changeEmailAddress.tsx | 7 +++---- modules/auth/component/ForgotPassword/ForgotPassword.tsx | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/auth/changeEmailAddress.tsx b/modules/auth/changeEmailAddress.tsx index b82377190..9276911f9 100644 --- a/modules/auth/changeEmailAddress.tsx +++ b/modules/auth/changeEmailAddress.tsx @@ -13,10 +13,9 @@ import { checkEmail } from '../../http/auth'; function ChangeEmailAddress() { const router = useRouter(); - const onSignUpWithEmailSuccess = (data: { message: string }) => { - if (data.message !== 'Email is available for use') { - const errorMessage = 'This email is already registered. Please try logging in or use a different email address.'; - notify({ message: errorMessage, type: 'error', theme: 'light' }); + const onSignUpWithEmailSuccess = (data: any) => { + if (data.status === 200) { + router.push('/auth/guest-signup-form') return; } }; diff --git a/modules/auth/component/ForgotPassword/ForgotPassword.tsx b/modules/auth/component/ForgotPassword/ForgotPassword.tsx index 7561141c4..5f03f7f0e 100644 --- a/modules/auth/component/ForgotPassword/ForgotPassword.tsx +++ b/modules/auth/component/ForgotPassword/ForgotPassword.tsx @@ -26,8 +26,6 @@ const ForgotPassword = () => { router.push(`/auth/forgot-password-link-sent?email=${email}`); return; } - - notifyError(data.message); }; // Form validation From 7f0c8bb67e83cbefe6391eb003c882ceb6f4d59c Mon Sep 17 00:00:00 2001 From: Anshuman Sathua Date: Mon, 23 Oct 2023 01:49:28 +0530 Subject: [PATCH 3/5] fixed email validation bug in the forgot password --- modules/auth/component/ForgotPassword/ForgotPassword.tsx | 2 +- modules/auth/component/guestsignupform.tsx | 2 +- modules/auth/resendVerification.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/auth/component/ForgotPassword/ForgotPassword.tsx b/modules/auth/component/ForgotPassword/ForgotPassword.tsx index 729b5e3c8..715b2b378 100644 --- a/modules/auth/component/ForgotPassword/ForgotPassword.tsx +++ b/modules/auth/component/ForgotPassword/ForgotPassword.tsx @@ -107,7 +107,7 @@ const ForgotPassword = () => { { notify({ message: res.message, type: 'error', - theme: 'light' + theme: 'light', }); }, }); diff --git a/modules/auth/resendVerification.tsx b/modules/auth/resendVerification.tsx index 3f7fec3d2..5355ab0f2 100644 --- a/modules/auth/resendVerification.tsx +++ b/modules/auth/resendVerification.tsx @@ -17,7 +17,7 @@ function ResendVerification() { const onresendEmailVerifySuccess = (data: any) => { if (data.message) { - notify({ message: data.message, type: data.status === 200 ? 'success' : 'error', theme: 'light' }); + notify({ message: data.message, type: 'success', theme: 'light' }); if (data.status === 200) { router.push(`/auth/verification?email=${email}`); } @@ -29,7 +29,7 @@ function ResendVerification() { if (error.response && error.response.message === 'AxiosError: timeout of 30000ms exceeded') { const timeoutErrorMessage = 'Oops! The request timed out. Please try again later. If the problem persists, please contact support.'; - notify({ message: timeoutErrorMessage }); + notify({ message: timeoutErrorMessage, type: 'error', theme: 'light' }); return; } From b4fba8520ed333e9638da31c5ff046f8eafe47ac Mon Sep 17 00:00:00 2001 From: Anshuman Sathua Date: Mon, 23 Oct 2023 01:54:42 +0530 Subject: [PATCH 4/5] UI fix in guest signup form --- modules/auth/component/guestsignupform.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/auth/component/guestsignupform.tsx b/modules/auth/component/guestsignupform.tsx index 93ec4e3e9..d2318e0e1 100644 --- a/modules/auth/component/guestsignupform.tsx +++ b/modules/auth/component/guestsignupform.tsx @@ -223,7 +223,15 @@ const Guestsignupform: React.FC = () => { /> - I agree with Zuri Terms of Service & Privacy Policy. + I agree with Zuri{' '} + + Terms of Service + {' '} + &{' '} + + Privacy Policy + + .