import { Box, Typography, useTheme } from "@mui/material"; import PropTypes from "prop-types"; import { useNavigate } from "react-router"; const ForgotPasswordLabel = ({ email, errorEmail }) => { const theme = useTheme(); const navigate = useNavigate(); const handleNavigate = () => { if (email !== "" && !errorEmail) { sessionStorage.setItem("email", email); } navigate("/forgot-password"); }; return ( Forgot password? Reset password ); }; ForgotPasswordLabel.proptype = { email: PropTypes.string.isRequired, emailError: PropTypes.string.isRequired, }; export default ForgotPasswordLabel;