aboutsummaryrefslogtreecommitdiffstats
path: root/panel/src/App.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'panel/src/App.jsx')
-rw-r--r--panel/src/App.jsx32
1 files changed, 32 insertions, 0 deletions
diff --git a/panel/src/App.jsx b/panel/src/App.jsx
new file mode 100644
index 0000000..6d88aaf
--- /dev/null
+++ b/panel/src/App.jsx
@@ -0,0 +1,32 @@
+import React from 'react';
+import { Route, Routes, Navigate } from 'react-router-dom';
+import LoginPage from './pages/LoginPage';
+import RegisterPage from './pages/RegisterPage';
+import ResetPage from './pages/ResetPage';
+import Dashboard from './pages/Dashboard';
+import ManageAds from './pages/ManageAds';
+import Roles from './pages/Roles';
+import PrivateRoute from './components/PrivateRoute';
+import { AuthProvider } from './contexts/AuthContext';
+import 'bootstrap/dist/css/bootstrap.min.css';
+import './tailwind.css';
+
+function App() {
+ return (
+ <AuthProvider>
+ <Routes>
+ <Route path="/" element={<Navigate to="/login" />} />
+ <Route path="/login" element={<LoginPage />} />
+ <Route path="/register" element={<RegisterPage />} />
+ <Route path="/reset" element={<ResetPage />} />
+ <Route path="/" element={<PrivateRoute />}>
+ <Route path="dashboard" element={<Dashboard />} />
+ <Route path="manage-ads" element={<ManageAds />} />
+ <Route path="roles" element={<Roles />} />
+ </Route>
+ </Routes>
+ </AuthProvider>
+ );
+}
+
+export default App;