From 62697fed3f39c54565c91d03050ea3b1c0d8ad28 Mon Sep 17 00:00:00 2001 From: Jadowacu1 <152473876+Jadowacu1@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:16:49 +0200 Subject: [PATCH] Users should be presented with a reset password link --- public/assets/images/resetPassword.png | Bin 0 -> 14865 bytes src/assets/styles/LandingPage.scss | 158 ++--- src/assets/styles/colors.scss | 27 - src/assets/styles/email.scss | 594 +++++++++---------- src/assets/styles/index.scss | 4 - src/assets/styles/reset-password.scss | 87 ++- src/assets/styles/signup.scss | 786 ++++++++++++------------- src/components/inputs/SearchInput.tsx | 1 - src/components/layout/Header.tsx | 2 +- src/pages/ResetPassword.tsx | 61 +- src/pages/SendResetPasswordLink.tsx | 46 +- src/router.tsx | 2 +- 12 files changed, 899 insertions(+), 869 deletions(-) create mode 100644 public/assets/images/resetPassword.png delete mode 100644 src/assets/styles/colors.scss delete mode 100644 src/assets/styles/index.scss diff --git a/public/assets/images/resetPassword.png b/public/assets/images/resetPassword.png new file mode 100644 index 0000000000000000000000000000000000000000..1cd42109d6dba8e9d1ff8fb804ddcd038a307252 GIT binary patch literal 14865 zcmZX*bySpJ^e#Tb3@t5<(jeU>E!_wLL(eGP-7!cAqM&pMND2%vBAvq+G)hY&0xI1d z_vQ2b-QT+F-alBZ^`3e6IcJ~qp7ZQyKRdxtUxS2*fd~Wwk!WeE8i7Dy{@XtSJm5)i zc#=Qx5A18C@d#8i%=8ZgVgYHXDnALb*|H{VHyxw7srBtt&lc4Yjd9eC8`RF$vZu+{ zh+Tdwa*(ClN1o7+qJ2b2sAjWwx8Jbrj@q}uv~^j>j<)TP(7FF@7Tyu95K?1`TXr=e{YmnFkHL1gM@;0bzOo7 zh_6sTqxs#-vyJx=SCcF*xNGi8_0-6r)cqc>uAS&JdGZd(TGL0T5pkEfQ=QM@A6o9R z7RIC(bqoI@67$5HawmoxfZ8BV2&_k(+aR7WA%+i)N>DvS#D$reC9(iN-Q&RyZeYA0 zK9MWjQuY%@N{H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exiXZY#umU-Zh3le%ai zo#e6#V(jIWRc-m6`~#$HeD{8%^Jq<0CV)CK|4#~K$|*y>Ya(dWh_;akV*3*#Cw~Ew zbEJK}VUGob|NJlVB~!sf%5E|A;u1Xg3@k@H8=-D{GOCExhW%qM&M~zO#rmH>Mik%+ zBGIfIe?&)~2zP-77&KICIsU{SGeLp$G0TTi&GP+;5pTP$D*1TQ$!E#~BuPxk!3-Ga z&*Px*37wG@lBJiFrl23ADC{lWJ8LRe7>e`ro>HRt1!I)wC$MfM%dQ#RoGRh(XM%IX zRKi=wk?(r@4;=ideQ|zd8U2Aes|h?}3X)8&x{1FCW**#$`g>2f3%C`^9{>Jkt3Fqr zV?YiJ1=?*;>FO{HR2B|B?z%4Xn%CnKZIrq#K};F2Tg5cKOY@vK_XiDv5B{*6*DuFl zxY4L&pj=VogY8W?TYvc%1AlfdU;_ZWn$G+apsedIXIeYD0gNJ?vc8uw@&A-YYATF{ z^#UbV7mP?-r9&ztGgx!z!w%eh5%ea&x8Ylhl;J?d#0^-iSnHc Cart - $ 100 + $ 0
{ const [showNewPassword, setShowNewPassword] = useState(false); @@ -27,6 +24,9 @@ const ResetPassword: React.FC = () => { const location = useLocation(); const dispatch = useAppDispatch(); const { user, isError, isSuccess, isLoading, message } = useAppSelector((state) => state?.auth); + const [isFormVisible, setIsFormVisible] = useState(true); + const [successMessage, setSuccessVisible] = useState(false); + const formik = useFormik({ initialValues: { password: '', @@ -34,32 +34,36 @@ const ResetPassword: React.FC = () => { }, onSubmit: (values) => { if (values.password !== values.confirmPassword) { - toast.error("Passwords do not match"); + formik.setStatus("Passwords do not match"); } else{ const pathParts = location.pathname.split('/'); const token = pathParts[pathParts.length - 1]; dispatch(resetPassword({ token, password: values.password })); + } }, }) useEffect(() => { if (isError) { - toast.error(message); + formik.setStatus(message); } if (isSuccess) { toast.success(message) - navigate('/login'); + setIsFormVisible(false); + setSuccessVisible(true); + } }, [user, isError, isSuccess, isLoading, message]) return ( <>
-
-
-

Reset password

-
+
+ {isFormVisible ? ( + +

Reset password

+
{ > -
+

{
- {isLoading ? ( -
- -
- ) : ( -
-
- )} -
+

{formik.status}


+
+ + + + ) : ( +
+
+
+ +

Password is changed

navigate("/login")}>Continue to login

+
+
+
+ )}





); diff --git a/src/pages/SendResetPasswordLink.tsx b/src/pages/SendResetPasswordLink.tsx index aac7aaa0..c5974f96 100644 --- a/src/pages/SendResetPasswordLink.tsx +++ b/src/pages/SendResetPasswordLink.tsx @@ -1,14 +1,11 @@ /* eslint-disable */ import React, { useEffect } from 'react' import { useFormik } from 'formik'; -import Header from '../components/layout/Header'; -import Button from '../components/buttons/Button'; import { useAppDispatch, useAppSelector } from '../store/store'; import { sendResetLink } from '../store/features/auth/authSlice'; -import '../styles/reset-password.scss'; import { toast } from 'react-toastify'; import * as Yup from 'yup'; -import { CircleLoader, PuffLoader } from 'react-spinners'; +import { PulseLoader } from 'react-spinners'; const ResetPasswordSchema = Yup.object().shape({ email: Yup.string().email('Email must be valid').required('Email is required'), @@ -21,19 +18,26 @@ const SendResetPasswordLink: React.FC = () => { email: '', }, validationSchema: ResetPasswordSchema, - onSubmit: (values) => { - dispatch(sendResetLink(values.email)); + onSubmit: (values, { setStatus }) => { + dispatch(sendResetLink(values.email)) + .then(() => { + if (isError) { + setStatus(message); + } + }); }, - }) + }); + useEffect(() => { if (isError) { - toast.error(message) - } + formik.setStatus(message); + } if (isSuccess) { toast.success(message) - formik.resetForm(); + formik.resetForm() } - }, [user, isError, isSuccess, isLoading, message]) + }, [isError, isSuccess, message]); + return ( <>
@@ -57,16 +61,14 @@ const SendResetPasswordLink: React.FC = () => { /> - {isLoading ? ( -
- -
- ) : ( -
-
- )} - +

{formik.status}



+






@@ -74,4 +76,4 @@ const SendResetPasswordLink: React.FC = () => { ); }; -export default SendResetPasswordLink; +export default SendResetPasswordLink; \ No newline at end of file diff --git a/src/router.tsx b/src/router.tsx index 42afadea..123df092 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -24,7 +24,7 @@ const AppRouter: React.FC = () => { } /> } /> } /> - } /> + } /> } /> } />