From af8fd1ca3f3dc5a1bc5e48ccb70cd7f43f6b75af Mon Sep 17 00:00:00 2001 From: inv-amalusudhakaran Date: Mon, 30 Dec 2024 21:34:49 +0530 Subject: [PATCH] solved Error related to OTP sending for email verification --- src/Pages/login_signupPage/SignupForm.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Pages/login_signupPage/SignupForm.jsx b/src/Pages/login_signupPage/SignupForm.jsx index 4a95a7e..2a45953 100644 --- a/src/Pages/login_signupPage/SignupForm.jsx +++ b/src/Pages/login_signupPage/SignupForm.jsx @@ -50,6 +50,7 @@ export default () => { const [otpSent, setOtpSent] = useState(false); const [otpVerified, setOtpVerified] = useState(false); const navigate = useNavigate(); + const [isEmailValid, setIsEmailValid] = useState(false); const onFinish = async (values) => { console.log("Received values of form: ", values); @@ -136,7 +137,8 @@ export default () => { const handleEmailChange = (e) => { const email = e.target.value; - if (email.endsWith("@sst.scaler.com")) { + if (email.endsWith("@sst.scaler.com") || email.endsWith("@scaler.com")) { + setIsEmailValid(true); setIsStudent(true); } else { setIsStudent(false); @@ -192,7 +194,10 @@ export default () => { {!otpVerified && ( -