-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
186 lines (184 loc) · 5.48 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
import ProtectedRoute from "@/components/protected-routes/protected-route";
import { Providers } from "@/lib/providers/providers";
import Organization from "@/pages/Organization/OrganizationHome";
import { useEffect } from "react";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { FacialAuthRegister } from "./components/ai-validation/facial-auth-register";
import { Join } from "./components/meet/join";
import Room from "./components/meet/room";
import { ws } from "./lib/socket/ws";
import { LandingPage } from "./pages/Landing";
import Exam from "./pages/Organization/Exam";
import ViewProctors from "./pages/Organization/ViewProctors";
import Questions from "./pages/Organization/questions";
import Students from "./pages/Organization/students";
import ProctorStreamPanel from "./pages/Proctor/proctor-stream-pannel";
import StudentExam from "./pages/Student/student-exam";
import SystemPermissionCheck from "./pages/Student/system-permission-check";
// import OrgProfile from "./pages/Organization/profile";
import FacialRegister from "./components/ai-validation/facial-register";
import ExamFinished from "./components/exam-finished/exam-finished";
import PendingApprovals from "./pages/Proctor/pendingApprovals";
import ProctorAllExams from "./pages/Proctor/viewExams";
import AllStudentExams from "./pages/Student/allexams";
import StdProfile from "./pages/Student/profile";
import Results from "./pages/Student/results";
import StudentVerify from "./pages/Student/student-verify";
// TODO: Routes Seperated into different files according to the access level
function App() {
useEffect(() => {
ws.on("connect", () => {
console.log("connected");
});
}, []);
return (
<Providers>
<BrowserRouter>
<Routes>
<Route
path="/"
element={
<ProtectedRoute>
<LandingPage />
</ProtectedRoute>
}
/>
<Route
path="/proctor/:id/stream"
element={
<ProtectedRoute>
<ProctorStreamPanel />
</ProtectedRoute>
}
/>
<Route path="/student/facial-register" element={<FacialRegister />} />
<Route
path="/student/exam/:id/verify"
element={
<ProtectedRoute>
<StudentVerify />
</ProtectedRoute>
}
/>
<Route
path="/student/exam/:id/finished"
element={
<ProtectedRoute>
<ExamFinished />
</ProtectedRoute>
}
/>
<Route
path="/student/exam/:id/system-check"
element={
<ProtectedRoute>
<SystemPermissionCheck />
</ProtectedRoute>
}
/>
<Route
path="/student/exam/:id/start"
element={
<ProtectedRoute>
<StudentExam />
</ProtectedRoute>
}
/>
<Route
path="/organization/dashboard"
element={
<ProtectedRoute>
<Organization />
</ProtectedRoute>
}
/>
<Route
path="/organization/exams"
element={
<ProtectedRoute>
<Exam />
</ProtectedRoute>
}
/>
<Route
path="/organization/questions"
element={
<ProtectedRoute>
<Questions />
</ProtectedRoute>
}
/>
<Route
path="/organization/students"
element={
<ProtectedRoute>
<Students />
</ProtectedRoute>
}
/>
<Route
path="/check"
element={
<ProtectedRoute>
<FacialAuthRegister />
{/* <Detection /> */}
</ProtectedRoute>
}
/>
<Route
path="/organization/allProctors"
element={
<ProtectedRoute>
<ViewProctors />
</ProtectedRoute>
}
/>
<Route
path="/student/account/profile"
element={
<ProtectedRoute>
<StdProfile />
</ProtectedRoute>
}
/>
<Route
path="/student/account/allexams"
element={
<ProtectedRoute>
<AllStudentExams />
</ProtectedRoute>
}
/>
<Route
path="/student/account/results"
element={
<ProtectedRoute>
<Results />
</ProtectedRoute>
}
/>
<Route
path="/proctor/activeExams"
element={
<ProtectedRoute>
<ProctorAllExams />
</ProtectedRoute>
}
/>
<Route
path="/proctor/studentapprovals"
element={
<ProtectedRoute>
<PendingApprovals />
</ProtectedRoute>
}
/>
{/* created nested routes for meet and meet id */}
<Route path="/join" element={<Join />} />
<Route path="/room/:id" element={<Room />} />
</Routes>
</BrowserRouter>
</Providers>
);
}
export default App;