aboutsummaryrefslogtreecommitdiffstats
path: root/panel/src/App.jsx
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-08-01 17:35:27 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2024-08-01 17:35:27 +0530
commitfb04271b5288e8fb5891b7d6326f4806d12b82d5 (patch)
treee459c3e1f8bb6e168becdddd0d48779135d91a7f /panel/src/App.jsx
parent4bb13ee84f6bb51cba6544ccd0690ab2049512a9 (diff)
parentb3c07fd9f1664dda4f16357aaca74dff8226401d (diff)
downloadadmin-panel-fb04271b5288e8fb5891b7d6326f4806d12b82d5.tar.gz
admin-panel-fb04271b5288e8fb5891b7d6326f4806d12b82d5.tar.bz2
admin-panel-fb04271b5288e8fb5891b7d6326f4806d12b82d5.zip
Merge remote-tracking branch 'project/master'
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;