Skip to content

Commit 0b2ad23

Browse files
feat: perms for dashboards
1 parent 7c47d60 commit 0b2ad23

30 files changed

+1145
-992
lines changed

client/src/App.tsx

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import { AuthProvider } from '@/contexts';
2-
import NewUser from '@/pages/AdminDashboard/NewUser';
3-
import AdminDashboard from '@/pages/AdminDashboard/StaffDashboard';
4-
import QrPage from '@/pages/CompletedSurvey/QrPage';
5-
import LandingPage from '@/pages/LandingPage/LandingPage';
6-
import Login from '@/pages/Login/Login';
7-
import SurveyDetails from '@/pages/PastEntries/SurveyDetails';
8-
import Profile from '@/pages/Profile/Profile';
9-
import ApplyReferral from '@/pages/QRCodeScanAndReferral/ApplyReferral';
10-
import Signup from '@/pages/Signup/Signup';
11-
import SurveyComponent from '@/pages/Survey/SurveyComponent';
12-
import SurveyEntryDashboard from '@/pages/SurveyEntryDashboard/SurveyEntryDashboard';
2+
import {
3+
Survey,
4+
SurveyDetails,
5+
SurveyEntryDashboard,
6+
QrPage,
7+
LandingPage,
8+
Login,
9+
Profile,
10+
ApplyReferral,
11+
Signup,
12+
StaffDashboard,
13+
NewUser
14+
} from '@/pages';
1315
import CssBaseline from '@mui/material/CssBaseline';
1416
import { ThemeProvider } from '@mui/material/styles';
1517
import {
@@ -18,9 +20,8 @@ import {
1820
BrowserRouter as Router,
1921
Routes
2022
} from 'react-router-dom';
21-
22-
import { ProtectedRoute } from './components/ProtectedRoute';
23-
import { muiTheme } from './theme/muiTheme';
23+
import { ProtectedRoute } from '@/components';
24+
import { muiTheme } from '@/theme/muiTheme';
2425

2526
function App() {
2627
return (
@@ -38,7 +39,7 @@ function App() {
3839
path="/survey/:id/continue"
3940
element={
4041
<ProtectedRoute>
41-
<SurveyComponent />
42+
<Survey />
4243
</ProtectedRoute>
4344
}
4445
/>
@@ -55,15 +56,15 @@ function App() {
5556
path="/survey"
5657
element={
5758
<ProtectedRoute>
58-
<SurveyComponent />
59+
<Survey />
5960
</ProtectedRoute>
6061
}
6162
/>
6263
<Route
6364
path="/admin-dashboard"
6465
element={
6566
<ProtectedRoute>
66-
<AdminDashboard />
67+
<StaffDashboard />
6768
</ProtectedRoute>
6869
}
6970
/>
@@ -119,7 +120,7 @@ function App() {
119120
path="/survey/:id/edit"
120121
element={
121122
<ProtectedRoute>
122-
<SurveyComponent />
123+
<Survey />
123124
</ProtectedRoute>
124125
}
125126
/>

0 commit comments

Comments
 (0)