feat: removed forgot password label in email and password step
This commit is contained in:
1 parent
9ef1c3572e
commit
3f7d3efe2b
2 files changed
+1
-69
No files matched your search
@@ -19,7 +19,6 @@ import { useNavigate } from "react-router";
|
|||||||
const EmailStep = ({ form, errors, onSubmit, onChange }) => {
|
const EmailStep = ({ form, errors, onSubmit, onChange }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const inputRef = useRef(null);
|
const inputRef = useRef(null);
|
||||||
const navigate = useNavigate();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (inputRef.current) {
|
if (inputRef.current) {
|
||||||
@@ -27,13 +26,6 @@ const EmailStep = ({ form, errors, onSubmit, onChange }) => {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleNavigate = () => {
|
|
||||||
if (form.email !== "" && !errors.email) {
|
|
||||||
sessionStorage.setItem("email", form.email);
|
|
||||||
}
|
|
||||||
navigate("/forgot-password");
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack
|
<Stack
|
||||||
@@ -90,32 +82,6 @@ const EmailStep = ({ form, errors, onSubmit, onChange }) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
|
||||||
textAlign="center"
|
|
||||||
sx={{
|
|
||||||
position: "absolute",
|
|
||||||
bottom: 0,
|
|
||||||
left: "50%",
|
|
||||||
transform: `translate(-50%, 150%)`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
className="forgot-p"
|
|
||||||
display="inline-block"
|
|
||||||
color={theme.palette.primary.main}
|
|
||||||
>
|
|
||||||
Forgot password?
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
|
||||||
component="span"
|
|
||||||
color={theme.palette.primary.main}
|
|
||||||
ml={theme.spacing(2)}
|
|
||||||
sx={{ userSelect: "none" }}
|
|
||||||
onClick={handleNavigate}
|
|
||||||
>
|
|
||||||
Reset password
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import PropTypes from "prop-types";
|
|||||||
*/
|
*/
|
||||||
const PasswordStep = ({ form, errors, onSubmit, onChange, onBack }) => {
|
const PasswordStep = ({ form, errors, onSubmit, onChange, onBack }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const navigate = useNavigate();
|
|
||||||
const inputRef = useRef(null);
|
const inputRef = useRef(null);
|
||||||
const authState = useSelector((state) => state.auth);
|
const authState = useSelector((state) => state.auth);
|
||||||
|
|
||||||
@@ -32,13 +31,6 @@ const PasswordStep = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleNavigate = () => {
|
|
||||||
if (form.email !== "" && !errors.email) {
|
|
||||||
sessionStorage.setItem("email", form.email);
|
|
||||||
}
|
|
||||||
navigate("/forgot-password");
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack
|
<Stack
|
||||||
@@ -117,32 +109,6 @@ const PasswordStep = ({ form, errors, onSubmit, onChange, onBack }) => {
|
|||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
|
||||||
textAlign="center"
|
|
||||||
sx={{
|
|
||||||
position: "absolute",
|
|
||||||
bottom: 0,
|
|
||||||
left: "50%",
|
|
||||||
transform: `translate(-50%, 150%)`,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
className="forgot-p"
|
|
||||||
display="inline-block"
|
|
||||||
color={theme.palette.primary.main}
|
|
||||||
>
|
|
||||||
Forgot password?
|
|
||||||
</Typography>
|
|
||||||
<Typography
|
|
||||||
component="span"
|
|
||||||
color={theme.palette.primary.main}
|
|
||||||
ml={theme.spacing(2)}
|
|
||||||
sx={{ userSelect: "none" }}
|
|
||||||
onClick={handleNavigate}
|
|
||||||
>
|
|
||||||
Reset password
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -156,4 +122,4 @@ PasswordStep.propTypes = {
|
|||||||
onBack: PropTypes.func.isRequired,
|
onBack: PropTypes.func.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default PasswordStep
|
export default PasswordStep;
|
||||||
Reference in new issue
Block a user