Skip to content

Commit a55cb5b

Browse files
committed
Add landing page if not logged in or not signed up
1 parent 66437c7 commit a55cb5b

File tree

2 files changed

+71
-1
lines changed

2 files changed

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

0 commit comments

Comments
 (0)