Skip to content

Commit 17311e5

Browse files
committed
Put bottom links on all pages
1 parent 2c20c42 commit 17311e5

File tree

8 files changed

+29
-57
lines changed

8 files changed

+29
-57
lines changed

src/App.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import CssBaseline from "@material-ui/core/CssBaseline";
55
import { ThemeProvider } from "@material-ui/core/styles";
66

77
import ConnectionsTracker from "./components/ConnectionsTracker";
8+
import Footer from "./components/Footer";
89
import Navbar from "./components/Navbar";
910
import WelcomeDialog from "./components/WelcomeDialog";
1011
import { SettingsContext, UserContext } from "./context";
@@ -185,6 +186,7 @@ function App() {
185186
<Route exact path="/profile/:id" component={ProfilePage} />
186187
<Route component={NotFoundPage} />
187188
</Switch>
189+
<Footer />
188190
</SettingsContext.Provider>
189191
</UserContext.Provider>
190192
)}

src/components/Footer.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import Link from "@material-ui/core/Link";
2+
import Typography from "@material-ui/core/Typography";
3+
4+
import InternalLink from "./InternalLink";
5+
6+
function Footer() {
7+
return (
8+
<Typography variant="body1" align="center" style={{ padding: "16px 0" }}>
9+
<InternalLink to="/help">Help</InternalLink>{" "}
10+
<InternalLink to="/about">About</InternalLink>{" "}
11+
<InternalLink to="/conduct">Conduct</InternalLink>{" "}
12+
<Link
13+
target="_blank"
14+
rel="noopener"
15+
href="https://github.com/eltoder/setwithfriends"
16+
>
17+
GitHub
18+
</Link>
19+
{" • "}
20+
<Link target="_blank" rel="noopener" href="https://discord.gg/XbjJyc9">
21+
Discord
22+
</Link>
23+
</Typography>
24+
);
25+
}
26+
27+
export default Footer;

src/pages/AboutPage.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ function AboutPage() {
5151
<InternalLink to="/legal">terms of service</InternalLink>.
5252
</Typography>
5353
</Paper>
54-
<Typography
55-
variant="body1"
56-
align="center"
57-
style={{ marginTop: 12, paddingBottom: 12 }}
58-
>
59-
<InternalLink to="/">Return to home</InternalLink>
60-
</Typography>
6154
</Container>
6255
);
6356
}

src/pages/ConductPage.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import Link from "@material-ui/core/Link";
33
import Paper from "@material-ui/core/Paper";
44
import Typography from "@material-ui/core/Typography";
55

6-
import InternalLink from "../components/InternalLink";
7-
86
function ConductPage() {
97
return (
108
<Container>
@@ -93,13 +91,6 @@ function ConductPage() {
9391
and contact a moderator.
9492
</Typography>
9593
</Paper>
96-
<Typography
97-
variant="body1"
98-
align="center"
99-
style={{ marginTop: 12, paddingBottom: 12 }}
100-
>
101-
<InternalLink to="/">Return to home</InternalLink>
102-
</Typography>
10394
</Container>
10495
);
10596
}

src/pages/HelpPage.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Link from "@material-ui/core/Link";
66
import Paper from "@material-ui/core/Paper";
77
import Typography from "@material-ui/core/Typography";
88

9-
import InternalLink from "../components/InternalLink";
109
import ScrollToHash from "../components/ScrollToHash";
1110
import SetCard from "../components/SetCard";
1211
import { SettingsContext } from "../context";
@@ -655,13 +654,6 @@ function HelpPage() {
655654
and computed as a floating-point number.
656655
</Typography>
657656
</Paper>
658-
<Typography
659-
variant="body1"
660-
align="center"
661-
style={{ marginTop: 12, paddingBottom: 12 }}
662-
>
663-
<InternalLink to="/">Return to home</InternalLink>
664-
</Typography>
665657
</Container>
666658
);
667659
}

src/pages/LegalPage.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import Tab from "@material-ui/core/Tab";
77
import Tabs from "@material-ui/core/Tabs";
88
import Typography from "@material-ui/core/Typography";
99

10-
import InternalLink from "../components/InternalLink";
11-
1210
// Created with GetTerms - https://getterms.io/
1311

1412
const TermsOfService = () => (
@@ -201,13 +199,6 @@ function LegalPage() {
201199
<Paper style={{ padding: "1rem", maxWidth: 720, margin: "12px auto" }}>
202200
{tab === "terms" ? <TermsOfService /> : <PrivacyPolicy />}
203201
</Paper>
204-
<Typography
205-
variant="body1"
206-
align="center"
207-
style={{ marginTop: 12, paddingBottom: 12 }}
208-
>
209-
<InternalLink to="/">Return to home</InternalLink>
210-
</Typography>
211202
</Container>
212203
);
213204
}

src/pages/LobbyPage.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -309,22 +309,6 @@ function LobbyPage() {
309309
</Grid>
310310
</Box>
311311
</Grid>
312-
<Typography variant="body1" align="center" style={{ padding: "16px 0" }}>
313-
<InternalLink to="/help">Help</InternalLink>{" "}
314-
<InternalLink to="/about">About</InternalLink>{" "}
315-
<InternalLink to="/conduct">Conduct</InternalLink>{" "}
316-
<Link
317-
target="_blank"
318-
rel="noopener"
319-
href="https://github.com/eltoder/setwithfriends"
320-
>
321-
GitHub
322-
</Link>{" "}
323-
{" "}
324-
<Link target="_blank" rel="noopener" href="https://discord.gg/XbjJyc9">
325-
Discord
326-
</Link>
327-
</Typography>
328312
</Container>
329313
);
330314
}

src/pages/NotFoundPage.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import Container from "@material-ui/core/Container";
22
import Typography from "@material-ui/core/Typography";
33

44
import cowImage from "../assets/cow_404.png";
5-
import InternalLink from "../components/InternalLink";
65

76
function NotFoundPage() {
87
return (
@@ -15,13 +14,6 @@ function NotFoundPage() {
1514
alt="404"
1615
style={{ display: "block", maxWidth: "100%", margin: "0 auto 8px" }}
1716
/>
18-
<Typography
19-
variant="body1"
20-
align="center"
21-
style={{ marginTop: 12, paddingBottom: 12 }}
22-
>
23-
<InternalLink to="/">Return to home</InternalLink>
24-
</Typography>
2517
</Container>
2618
);
2719
}

0 commit comments

Comments
 (0)