Final auth design and removed email from session storage upon navigation to /login
This commit is contained in:
1 parent
c4071a945d
commit
5f339323c3
3 files changed
+34
-36
No files matched your search
@@ -79,6 +79,11 @@ const CheckEmail = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleNavigate = () => {
|
||||||
|
sessionStorage.removeItem("email");
|
||||||
|
navigate("/login");
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack className="check-email-page auth" overflow="hidden">
|
<Stack className="check-email-page auth" overflow="hidden">
|
||||||
<img
|
<img
|
||||||
@@ -159,9 +164,7 @@ const CheckEmail = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
ml={theme.gap.xs}
|
ml={theme.gap.xs}
|
||||||
onClick={() => {
|
onClick={handleNavigate}
|
||||||
navigate("/login");
|
|
||||||
}}
|
|
||||||
sx={{ userSelect: "none" }}
|
sx={{ userSelect: "none" }}
|
||||||
>
|
>
|
||||||
Log In
|
Log In
|
||||||
|
|||||||
@@ -81,6 +81,11 @@ const ForgotPassword = () => {
|
|||||||
else delete errors.email;
|
else delete errors.email;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleNavigate = () => {
|
||||||
|
sessionStorage.removeItem("email");
|
||||||
|
navigate("/login");
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack className="forgot-password-page auth" overflow="hidden">
|
<Stack className="forgot-password-page auth" overflow="hidden">
|
||||||
<img
|
<img
|
||||||
@@ -159,9 +164,7 @@ const ForgotPassword = () => {
|
|||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
ml={theme.gap.xs}
|
ml={theme.gap.xs}
|
||||||
onClick={() => {
|
onClick={handleNavigate}
|
||||||
navigate("/login");
|
|
||||||
}}
|
|
||||||
sx={{ userSelect: "none" }}
|
sx={{ userSelect: "none" }}
|
||||||
>
|
>
|
||||||
Log In
|
Log In
|
||||||
|
|||||||
@@ -57,46 +57,38 @@ const NewPasswordConfirmed = () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
></Stack>
|
>
|
||||||
|
<Stack gap={theme.gap.large} alignItems="center" textAlign="center">
|
||||||
|
<Box>
|
||||||
|
<ConfirmIcon alt="password confirm icon" />
|
||||||
|
<Typography component="h1">Password reset</Typography>
|
||||||
|
<Typography mt={theme.gap.xs}>
|
||||||
|
Your password has been successfully reset. Click below to log in
|
||||||
|
magically.
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
<Button
|
||||||
|
level="primary"
|
||||||
|
label="Continue"
|
||||||
|
onClick={() => navigate("/monitors")}
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
maxWidth: 400,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
<Box textAlign="center" p={theme.gap.large}>
|
<Box textAlign="center" p={theme.gap.large}>
|
||||||
<Typography display="inline-block">Go back to —</Typography>
|
<Typography display="inline-block">Go back to —</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
component="span"
|
component="span"
|
||||||
ml={theme.gap.xs}
|
ml={theme.gap.xs}
|
||||||
onClick={() => {
|
onClick={handleNavigate}
|
||||||
navigate("/login");
|
|
||||||
}}
|
|
||||||
sx={{ userSelect: "none" }}
|
sx={{ userSelect: "none" }}
|
||||||
>
|
>
|
||||||
Log In
|
Log In
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
{/* <form className="password-confirmed-form">
|
|
||||||
<Stack direction="column" alignItems="center" gap={theme.gap.small}>
|
|
||||||
<ConfirmIcon alt="confirm icon" style={{ fill: "white" }} />
|
|
||||||
<Typography component="h1" sx={{ mt: theme.gap.ml }}>
|
|
||||||
Password reset
|
|
||||||
</Typography>
|
|
||||||
<Typography sx={{ textAlign: "center" }}>
|
|
||||||
Your password has been successfully reset. Click below to log in
|
|
||||||
magically.
|
|
||||||
</Typography>
|
|
||||||
</Stack>
|
|
||||||
<Stack gap={theme.gap.large} sx={{ mt: `calc(${theme.gap.ml}*2)` }}>
|
|
||||||
<Button
|
|
||||||
level="primary"
|
|
||||||
label="Continue"
|
|
||||||
onClick={() => navigate("/monitors")}
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
level="tertiary"
|
|
||||||
label="Back to log in"
|
|
||||||
img={<ArrowBackRoundedIcon />}
|
|
||||||
sx={{ alignSelf: "center", width: "fit-content" }}
|
|
||||||
onClick={handleNavigate}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
</form> */}
|
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user