summaryrefslogtreecommitdiff
path: root/src/app/StudentRoutes.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/StudentRoutes.js')
-rw-r--r--src/app/StudentRoutes.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/app/StudentRoutes.js b/src/app/StudentRoutes.js
new file mode 100644
index 0000000..1dc6b4a
--- /dev/null
+++ b/src/app/StudentRoutes.js
@@ -0,0 +1,31 @@
+import { Navigate, Route, Routes } from 'react-router-dom';
+
+import Home from '../screens/student/Home';
+import Classroom from '../screens/student/Classroom';
+
+import Information from '../screens/Information';
+import Calendar from '../screens/Calendar';
+import Assignment from '../screens/Assignment';
+import Profile from '../screens/Profile';
+
+function StudentRoutes() {
+ return (
+ <Routes>
+ <Route path="/home" element={<Home />} />
+ <Route path="/info" element={<Information />} />
+ <Route path="/calendar" element={<Calendar />} />
+ <Route path="/profile" element={<Profile />} />
+ <Route path="/class">
+ <Route path=":id" element={<Classroom />} />
+ </Route>
+ <Route path="/assignment">
+ <Route path=":id" element={<Assignment />} />
+ </Route>
+ <Route path="/login" element={<Navigate to="/home" />} />
+ <Route path="/register" element={<Navigate to="/home" />} />
+ <Route path="/" element={<Navigate to="/home" />} />
+ </Routes>
+ );
+}
+
+export default StudentRoutes;