diff --git a/Client/src/Pages/Auth/Login/Components/EmailStep.jsx b/Client/src/Pages/Auth/Login/Components/EmailStep.jsx
index f78193186..08ae51c4f 100644
--- a/Client/src/Pages/Auth/Login/Components/EmailStep.jsx
+++ b/Client/src/Pages/Auth/Login/Components/EmailStep.jsx
@@ -1,8 +1,9 @@
-import { useRef, useEffect } from "react";
+import { useRef, useEffect } from "react";
import { Box, Button, Stack, Typography } from "@mui/material";
import { useTheme } from "@emotion/react";
import TextInput from "../../../../Components/Inputs/TextInput";
import PropTypes from "prop-types";
+import { useNavigate } from "react-router";
/**
* Renders the email step of the login process which includes an email field.
@@ -18,6 +19,7 @@ import PropTypes from "prop-types";
const EmailStep = ({ form, errors, onSubmit, onChange }) => {
const theme = useTheme();
const inputRef = useRef(null);
+ const navigate = useNavigate();
useEffect(() => {
if (inputRef.current) {
@@ -25,11 +27,19 @@ const EmailStep = ({ form, errors, onSubmit, onChange }) => {
}
}, []);
+ const handleNavigate = () => {
+ if (form.email !== "" && !errors.email) {
+ sessionStorage.setItem("email", form.email);
+ }
+ navigate("/forgot-password");
+ };
+
return (
<>
Log In
@@ -80,6 +90,32 @@ const EmailStep = ({ form, errors, onSubmit, onChange }) => {
+
+
+ Forgot password?
+
+
+ Reset password
+
+
>
);
@@ -92,4 +128,4 @@ EmailStep.propTypes = {
onChange: PropTypes.func.isRequired,
};
-export default EmailStep;
\ No newline at end of file
+export default EmailStep;