Skip to content

Add blank page components #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0"
"react-dom": "^19.0.0",
"react-router-dom": "^7.5.1"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
Expand Down
61 changes: 24 additions & 37 deletions web/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,44 +1,31 @@
import { useEffect, useState } from "react";
import reactLogo from "./assets/react.svg";
import viteLogo from "/vite.svg";
import "./App.css";

function App() {
const [count, setCount] = useState(0);
const [apiData, setApiData] = useState("");

useEffect(() => {
fetch(import.meta.env.VITE_BASE_API_URL + "/api/test")
.then((res) => res.json())
.then((body) => setApiData(body.message));
});
import Navbar from "./components/Navbar";
import Profile from "./pages/Profile";
import Login from "./pages/auth/Login";
import Signup from "./pages/auth/Signup";
import Dashboard from "./pages/Dashboard";
import Schedule from "./pages/Schedule";
import Activities from "./pages/Activities";
import Quizzes from "./pages/Quizzes";
import LeetcodeQuizzes from "./pages/LeetcodeQuizzes";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";

function App() {
return (
<>
<div>
<a href="https://vite.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
<strong>Message from api:</strong> {apiData}
</p>
<p>
Edit <code>src/App.tsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
</>
<Router>
<Navbar />
<Routes>
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<Signup />} />
<Route path="/" element={<Dashboard />} />
<Route path="/profile" element={<Profile />} />
<Route path="/schedule" element={<Schedule />} />
<Route path="/activities" element={<Activities />} />
<Route path="/quizzes" element={<Quizzes />} />
<Route path="/leetcode-quizzes" element={<LeetcodeQuizzes />} />
</Routes>
</Router>
);
}

Expand Down
11 changes: 11 additions & 0 deletions web/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function Navbar() {
return (
<div>
<h1>Navbar</h1>
</div>
);
}

export default Navbar;
11 changes: 11 additions & 0 deletions web/src/pages/Activities.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function Activities() {
return (
<div>
<h1>Activities and Events</h1>
</div>
);
}

export default Activities;
11 changes: 11 additions & 0 deletions web/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function Dashboard() {
return (
<div>
<h1>Dashboard Page</h1>
</div>
);
}

export default Dashboard;
11 changes: 11 additions & 0 deletions web/src/pages/LeetcodeQuizzes.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function LeetcodeQuizzes() {
return (
<div>
<h1>Leetcode Quizzes</h1>
</div>
);
}

export default LeetcodeQuizzes;
11 changes: 11 additions & 0 deletions web/src/pages/Profile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function Profile() {
return (
<div>
<h1>Profile</h1>
</div>
);
}

export default Profile;
11 changes: 11 additions & 0 deletions web/src/pages/Quizzes.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function Quizzes() {
return (
<div>
<h1>Quizzes</h1>
</div>
);
}

export default Quizzes;
11 changes: 11 additions & 0 deletions web/src/pages/Schedule.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function Schedule() {
return (
<div>
<h1>Schedule View</h1>
</div>
);
}

export default Schedule;
11 changes: 11 additions & 0 deletions web/src/pages/auth/Login.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function Login() {
return (
<div>
<h1>Login</h1>
</div>
);
}

export default Login;
11 changes: 11 additions & 0 deletions web/src/pages/auth/Signup.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

function Signup() {
return (
<div>
<h1>Signup</h1>
</div>
);
}

export default Signup;