1
+ import { Routes , Route } from 'react-router-dom' ;
2
+ import AdminDashboardPage from './pages/AdminDashboardPage' ;
3
+ import StudentDashboardPage from './pages/StudentDashboardPage' ;
4
+ import Welcome from './Welcome'
5
+ import AdminLoginPage from './pages/AdminLoginPage'
6
+ import QuizPage from './pages/QuizFormPage' ;
7
+ import TestView from './pages/TestView' ;
8
+ import PreviewQuiz from "./components/QuizPreview"
9
+ import EditQuiz from "./components/EditQuiz"
10
+ import NotFound from './pages/NotFound' ;
11
+ import TeachersStudentView from './pages/TeachersStudentView' ;
12
+ import TestViewUser from './pages/TestViewUser' ;
13
+ import Profile from './pages/Profile' ;
14
+ import TeachersStudentViewUser from './pages/TeachersStudentViewUser' ;
15
+ import ProfileTeacher from './pages/ProfileTeacher' ;
16
+ function Router ( ) {
17
+ const name = localStorage . getItem ( 'name' )
18
+
19
+ return (
20
+ < Routes >
21
+ < Route path = '*' element = { < NotFound /> } />
22
+ < Route path = "/" element = { < Welcome /> } />
23
+ < Route path = "/Login" element = { < AdminLoginPage /> } />
24
+ < Route path = "/student-result" element = { < TeachersStudentView /> } />
25
+ < Route path = "/admin-dashboard" element = { < AdminDashboardPage /> } />
26
+ < Route path = "/test-view" element = { < TestView /> } />
27
+ < Route path = "/user-dashboard" element = { < StudentDashboardPage /> } />
28
+ < Route path = "/create-quiz" element = { < QuizPage /> } />
29
+ < Route path = "/prev-quiz" element = { < PreviewQuiz /> } />
30
+ < Route path = "/edit-quiz" element = { < EditQuiz /> } />
31
+ < Route path = { `/${ name } /test-view` } element = { < TestViewUser /> } />
32
+ < Route path = { `/${ name } /profile` } element = { < Profile /> } />
33
+ < Route path = { `/${ name } /results` } element = { < TeachersStudentViewUser /> } />
34
+ </ Routes >
35
+ )
36
+ }
37
+
38
+ export default Router ;
0 commit comments