From 4ccf8409b4d9206d2a1575d56e629fc237412f49 Mon Sep 17 00:00:00 2001 From: MVarshini Date: Wed, 8 Mar 2023 18:52:51 +0530 Subject: [PATCH] PBENCH-1096 Sign-up page Bugs on Signup page --- .../components/AuthComponent/LoginForm.jsx | 4 +++ .../components/AuthComponent/SignupForm.jsx | 10 ++++---- .../components/AuthComponent/index.less | 25 +++++++++++-------- .../AuthComponent/signupFormData.js | 5 ++-- 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/dashboard/src/modules/components/AuthComponent/LoginForm.jsx b/dashboard/src/modules/components/AuthComponent/LoginForm.jsx index 177600a7a0..932ffccc97 100644 --- a/dashboard/src/modules/components/AuthComponent/LoginForm.jsx +++ b/dashboard/src/modules/components/AuthComponent/LoginForm.jsx @@ -153,6 +153,10 @@ const LoginForm = () => { +
-or-
+
+ +
); diff --git a/dashboard/src/modules/components/AuthComponent/SignupForm.jsx b/dashboard/src/modules/components/AuthComponent/SignupForm.jsx index 8ce71859e5..4cbf0333d1 100644 --- a/dashboard/src/modules/components/AuthComponent/SignupForm.jsx +++ b/dashboard/src/modules/components/AuthComponent/SignupForm.jsx @@ -100,7 +100,7 @@ const SignupForm = () => { }, [validateForm, userDetails, dispatch, endpoints]); const checkPasswordError = (password, cnfPassword) => { - if (password !== cnfPassword) { + if (cnfPassword.length > 1 && password !== cnfPassword) { setErrors({ ...errors, passwordConfirm: "The above passwords do not match!", @@ -157,16 +157,16 @@ const SignupForm = () => {
- {signupFormData.map((formItem, index) => { + {signupFormData.map((formItem) => { return (
- {formItem.name === "password" ? ( + {["password", "passwordConfirm"].includes(formItem.name) ? ( { onChange={(val) => changeHandler(val, formItem.name)} /> )} - {formItem.name === "password" && ( + {["password", "passwordConfirm"].includes(formItem.name) && (