Skip to content

Commit 28394d1

Browse files
authored
Merge pull request #60 from nicolelim02/feat/users
Add forget password button
2 parents 2278acb + b5e3f9a commit 28394d1

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

frontend/src/pages/LogIn/index.tsx

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Box, Button, Stack, TextField, Typography } from "@mui/material";
1+
import {
2+
Box,
3+
Button,
4+
Stack,
5+
styled,
6+
TextField,
7+
Typography,
8+
TypographyProps,
9+
} from "@mui/material";
210
import LogInSvg from "../../assets/login.svg?react";
311
import { useNavigate } from "react-router-dom";
412
import { useAuth } from "../../contexts/AuthContext";
@@ -12,6 +20,10 @@ import {
1220
USE_AUTH_ERROR_MESSAGE,
1321
} from "../../utils/constants";
1422

23+
const StyledTypography = styled((props: TypographyProps) => {
24+
return <Typography {...props} component={"span"} />;
25+
})({ fontSize: 14 });
26+
1527
const LogIn: React.FC = () => {
1628
const navigate = useNavigate();
1729
const auth = useAuth();
@@ -99,26 +111,36 @@ const LogIn: React.FC = () => {
99111
<Stack
100112
direction="row"
101113
spacing={0.5}
102-
sx={{ justifyContent: "flex-end" }}
114+
sx={{ justifyContent: "space-between" }}
103115
>
104-
<Typography component="span" sx={{ fontSize: 14 }}>
105-
Don't have an account?
106-
</Typography>
107-
<Typography
108-
component="span"
116+
<StyledTypography
109117
role="button"
110118
tabIndex={0}
111119
sx={{
112-
fontSize: 14,
113120
cursor: "pointer",
114121
"&:hover": {
115122
textDecoration: "underline",
116123
},
117124
}}
118-
onClick={() => navigate("/signup")}
119125
>
120-
Sign up
121-
</Typography>
126+
Forget password
127+
</StyledTypography>
128+
<Box>
129+
<StyledTypography>Don't have an account? &nbsp;</StyledTypography>
130+
<StyledTypography
131+
role="button"
132+
tabIndex={0}
133+
sx={{
134+
cursor: "pointer",
135+
"&:hover": {
136+
textDecoration: "underline",
137+
},
138+
}}
139+
onClick={() => navigate("/signup")}
140+
>
141+
Sign up
142+
</StyledTypography>
143+
</Box>
122144
</Stack>
123145
</Stack>
124146
</Box>

0 commit comments

Comments
 (0)