summaryrefslogtreecommitdiff
path: root/frontend/src/App.tsx
diff options
context:
space:
mode:
authorArne Rief <riearn@proton.me>2025-12-19 20:03:03 +0100
committerArne Rief <riearn@proton.me>2025-12-19 20:03:03 +0100
commit655ec610fcce8dd7748f10772d520bdff4f7c78e (patch)
tree35b79f30d2cb5aea88cf76ce27f480da93cefd32 /frontend/src/App.tsx
Basic setup & login
Diffstat (limited to 'frontend/src/App.tsx')
-rw-r--r--frontend/src/App.tsx23
1 files changed, 23 insertions, 0 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
new file mode 100644
index 0000000..e2e7253
--- /dev/null
+++ b/frontend/src/App.tsx
@@ -0,0 +1,23 @@
+import { Navigate, Route, Routes } from "react-router-dom";
+import ProtectedRoute from "./components/ProtectedRoute";
+import Dashboard from "./pages/Dashboard";
+import Login from "./pages/Login";
+
+function App() {
+ return (
+ <Routes>
+ <Route path="/login" element={<Login />} />
+ <Route
+ path="/dashboard"
+ element={
+ <ProtectedRoute>
+ <Dashboard />
+ </ProtectedRoute>
+ }
+ />
+ <Route path="*" element={<Navigate to="/login" replace />} />
+ </Routes>
+ );
+}
+
+export default App;