feat(auth): implement login authorization
feat(font): implement satoshi font family
This commit is contained in:
25
src/App.tsx
25
src/App.tsx
@ -1,10 +1,27 @@
|
||||
import "./App.css";
|
||||
import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
|
||||
import { Login } from "./pages/login";
|
||||
import { StudentDashboard } from "./pages/StudentDashboard";
|
||||
import { ProtectedRoute } from "./components/ProtectedRoute";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<>
|
||||
<h1 className="text-7xl font-bold">Edbridge Scholars</h1>
|
||||
</>
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/login" element={<Login />} />
|
||||
|
||||
{/* Protected Routes */}
|
||||
<Route path="/student" element={<ProtectedRoute />}>
|
||||
<Route index element={<StudentDashboard />} />
|
||||
{/* Add more subroutes here as needed */}
|
||||
</Route>
|
||||
|
||||
{/* Redirect root to student */}
|
||||
<Route path="/" element={<Navigate to="/student" replace />} />
|
||||
|
||||
{/* Catch all - redirect to student */}
|
||||
<Route path="*" element={<Navigate to="/student" replace />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user