feat: Leaderboard access for Admins

This commit is contained in:
Satyam
2026-02-11 19:01:42 +05:30
parent be828b205d
commit 3b40ab18f4
6 changed files with 477 additions and 7 deletions
+10
View File
@@ -8,6 +8,7 @@ import Dashboard from './pages/Dashboard';
import Maps from './pages/Maps';
import AdminSchedule from './pages/AdminSchedule';
import CustomerProfile from './pages/CustomerProfile';
import LeaderboardPage from './pages/LeaderboardPage';
import ErrorBoundary from './components/ErrorBoundary';
import { Toaster } from 'sonner';
import NotFound from './pages/NotFound';
@@ -73,6 +74,15 @@ function App() {
</ProtectedRoute>
}
/>
<Route
path="/admin/leaderboard"
element={
<ProtectedRoute allowedRoles={['ADMIN']}>
<LeaderboardPage />
</ProtectedRoute>
}
/>
</Route>
{/* Catch all */}