Skip to content

Commit 6a2a659

Browse files
fix(frontend): fix menu overflow bug
1 parent fc3ca00 commit 6a2a659

4 files changed

Lines changed: 39 additions & 6 deletions

File tree

frontend/src/App.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
html,
22
body {
3+
width: 100vw;
34
margin: 0;
45
padding: 0;
56
overflow-x: hidden;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { IconButton, IconButtonProps } from "@material-ui/core";
2+
import { ArrowBack } from "@material-ui/icons";
3+
import React from "react";
4+
import { useHistory } from "react-router";
5+
6+
type BackButtonProps = {
7+
//
8+
} & IconButtonProps;
9+
const BackButton: React.FC<BackButtonProps> = ({ ...props }) => {
10+
const history = useHistory();
11+
const handleClick = () => {
12+
history.push("/");
13+
};
14+
return (
15+
<>
16+
<IconButton onClick={handleClick} {...props}>
17+
<ArrowBack />
18+
</IconButton>
19+
</>
20+
);
21+
};
22+
23+
export default BackButton;

frontend/src/components/Navs/navLinks/style.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
li {
1+
.Link li {
22
color: #c7c7c7;
33
/* color: white; */
44
font-size: 1.1rem;
@@ -31,7 +31,7 @@ li {
3131
}
3232

3333
@media only screen and (max-width: 1180px) {
34-
li {
34+
.Link li {
3535
width: 100vw;
3636
padding: 2.5vh 0;
3737
text-align: center;

frontend/src/components/RegistrationForm/index.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ import Login from "./Login";
55
import Signup from "./Signup";
66
import GoogleButton from "../Buttons/GoogleButton";
77
import ResetPassword from "./ResetPassword";
8+
import BackButton from "../Buttons/BackButton";
89

910
const useStyles = makeStyles((theme: Theme) =>
1011
createStyles({
1112
title: {
12-
margin: "4vh",
13+
margin: "3vh",
1314
fontWeight: "bold",
1415
fontSize: "1.4rem",
1516
},
17+
flexbox: {
18+
paddingLeft: "2vh",
19+
display: "flex",
20+
alignItems: "center",
21+
},
1622
main: {
1723
width: "30vw",
1824
[theme.breakpoints.down("sm")]: {
@@ -37,9 +43,12 @@ const RegistrationForm: React.FC = () => {
3743

3844
return (
3945
<Paper className={classes.main}>
40-
<Typography className={classes.title} align="center">
41-
{heading[page]}
42-
</Typography>
46+
<div className={classes.flexbox}>
47+
<BackButton />
48+
<Typography className={classes.title} align="center">
49+
{heading[page]}
50+
</Typography>
51+
</div>
4352
<GoogleButton />
4453
<Typography className={classes.or} align="center">
4554
OR

0 commit comments

Comments
 (0)