From 72bc3a5652dfc46104b5b9e9464344deba230504 Mon Sep 17 00:00:00 2001 From: Daniel Cojocea Date: Fri, 9 Aug 2024 16:16:21 -0400 Subject: [PATCH] Added forgot password button --- Client/src/Pages/Auth/Login.jsx | 21 +++++++++++++++++++-- Client/src/Pages/Auth/index.css | 24 ++++++++++++------------ 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/Client/src/Pages/Auth/Login.jsx b/Client/src/Pages/Auth/Login.jsx index f69a95cfd..2868b5d75 100644 --- a/Client/src/Pages/Auth/Login.jsx +++ b/Client/src/Pages/Auth/Login.jsx @@ -144,6 +144,7 @@ const StepOne = ({ form, errors, onSubmit, onChange, onBack }) => { */ const StepTwo = ({ form, errors, onSubmit, onChange, onBack }) => { const theme = useTheme(); + const navigate = useNavigate(); const inputRef = useRef(null); useEffect(() => { @@ -194,10 +195,23 @@ const StepTwo = ({ form, errors, onSubmit, onChange, onBack }) => { level="primary" label="Continue" onClick={onSubmit} - disabled={errors.email && true} + disabled={errors.password && true} sx={{ width: "30%" }} /> + + + Forgot password? + + navigate("/forgot-password")} + > + Reset password + + ); @@ -292,6 +306,9 @@ const Login = () => { body: "Welcome back! You're successfully logged in.", }); } else { + setErrors({ + password: "The password you provided does not match our records", + }); if (action.payload) { // dispatch errors createToast({ @@ -368,7 +385,7 @@ const Login = () => { )} - Don't have an account? - + Don't have an account? —