Skip to content

Commit 0a40199

Browse files
authored
Merge pull request #25 from CS3219-AY2324S1/landing-page
Add landing page if not logged in or not signed up
2 parents 66437c7 + b3942df commit 0a40199

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

src/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Login from "./pages/login";
77
import SignUp from "./pages/signup";
88
import AuthGuard from "./auth/AuthGuard";
99
import { DataContextProvider } from "./data/data.context";
10+
import Landing from "./pages/landing";
1011

1112
const root = ReactDOM.createRoot(
1213
document.getElementById("root") as HTMLElement
@@ -17,9 +18,10 @@ root.render(
1718
<AuthContextProvider>
1819
<DataContextProvider>
1920
<Routes>
20-
<Route path="/" element={<App />} />
21+
<Route path="/" element={<Landing />} />
2122
<Route path="/login" element={<Login />} />
2223
<Route path="/signup" element={<SignUp />} />
24+
{/* <Route path="/landing" element={<Landing />} /> */}
2325
<Route
2426
path="/home"
2527
element={

src/pages/landing.tsx

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import React from "react";
2+
import { Link as RouterLink } from "react-router-dom";
3+
import {
4+
Typography,
5+
Button,
6+
Container,
7+
Paper,
8+
Grid,
9+
} from "@mui/material";
10+
11+
function Landing() {
12+
return (
13+
<Container maxWidth="md">
14+
<Paper elevation={3} sx={{ padding: 4, marginTop: 4 }}>
15+
<Typography variant="h4" align="center" gutterBottom>
16+
Welcome to PeerPrep!
17+
</Typography>
18+
<Typography variant="body1" align="center" paragraph>
19+
Prepare for technical interviews with PeerPrep
20+
</Typography>
21+
<Grid container spacing={3}>
22+
<Grid item xs={12} sm={6}>
23+
<Typography variant="h5" gutterBottom>
24+
Why Choose Us?
25+
</Typography>
26+
<Typography variant="body1">
27+
PeerPrep is your go-to platform for technical interview
28+
preparation. Practice whiteboard-style interview questions with
29+
peers and improve your skills.
30+
</Typography>
31+
</Grid>
32+
<Grid item xs={12} sm={6}>
33+
<Typography variant="h5" gutterBottom>
34+
Get Started
35+
</Typography>
36+
<Typography variant="body1">
37+
Join our community of students and professionals to enhance your
38+
technical interview skills.
39+
</Typography>
40+
<Button
41+
variant="contained"
42+
color="primary"
43+
component={RouterLink}
44+
to="/signup"
45+
sx={{ marginRight: 2 }}
46+
>
47+
Sign Up
48+
</Button>
49+
<Button
50+
variant="outlined"
51+
color="primary"
52+
component={RouterLink}
53+
to="/login"
54+
>
55+
Log In
56+
</Button>
57+
</Grid>
58+
</Grid>
59+
</Paper>
60+
<Typography variant="body2" align="center" sx={{ marginTop: 2 }}>
61+
&copy; 2023 PeerPrep
62+
</Typography>
63+
</Container>
64+
);
65+
}
66+
67+
export default Landing;

0 commit comments

Comments
 (0)