diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index cbd3ca61..4a9cfdb0 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -9,7 +9,8 @@
"version": "0.0.0",
"dependencies": {
"react": "^18.2.0",
- "react-dom": "^18.2.0"
+ "react-dom": "^18.2.0",
+ "react-router-dom": "^6.22.2"
},
"devDependencies": {
"@types/react": "^18.2.56",
@@ -991,6 +992,14 @@
"node": ">= 8"
}
},
+ "node_modules/@remix-run/router": {
+ "version": "1.15.2",
+ "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2.tgz",
+ "integrity": "sha512-+Rnav+CaoTE5QJc4Jcwh5toUpnVLKYbpU6Ys0zqbakqbaLQHeglLVHPfxOiQqdNmUy5C2lXz5dwC6tQNX2JW2Q==",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.0.tgz",
@@ -3875,6 +3884,36 @@
"node": ">=0.10.0"
}
},
+ "node_modules/react-router": {
+ "version": "6.22.2",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.2.tgz",
+ "integrity": "sha512-YD3Dzprzpcq+tBMHBS822tCjnWD3iIZbTeSXMY9LPSG541EfoBGyZ3bS25KEnaZjLcmQpw2AVLkFyfgXY8uvcw==",
+ "dependencies": {
+ "@remix-run/router": "1.15.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.8"
+ }
+ },
+ "node_modules/react-router-dom": {
+ "version": "6.22.2",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2.tgz",
+ "integrity": "sha512-WgqxD2qySEIBPZ3w0sHH+PUAiamDeszls9tzqMPBDA1YYVucTBXLU7+gtRfcSnhe92A3glPnvSxK2dhNoAVOIQ==",
+ "dependencies": {
+ "@remix-run/router": "1.15.2",
+ "react-router": "6.22.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=16.8",
+ "react-dom": ">=16.8"
+ }
+ },
"node_modules/reflect.getprototypeof": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.5.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index 7e34d8ff..2649e602 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -6,12 +6,13 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
+ "lint": "tsc --noEmit && eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.2.0",
- "react-dom": "^18.2.0"
+ "react-dom": "^18.2.0",
+ "react-router-dom": "^6.22.2"
},
"devDependencies": {
"@types/react": "^18.2.56",
diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx
index 3d7150da..2912f985 100644
--- a/frontend/src/main.tsx
+++ b/frontend/src/main.tsx
@@ -1,10 +1,39 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
-import App from './App.tsx'
+import {createBrowserRouter, RouterProvider,} from "react-router-dom";
import './index.css'
+import Root from './pages/root.tsx'
+import ErrorPage from './pages/error.tsx'
+import LoginScreen from "./pages/login/LoginScreen.tsx";
+import HomeAdmin from "./pages/admin/HomeAdmin.tsx";
+import HomeStudent from "./pages/student/HomeStudent.tsx";
+import HomeTeacher from "./pages/teacher/HomeTeacher.tsx";
+const router = createBrowserRouter([
+ {
+ path: "/",
+ element:
Sorry, an unexpected error has occurred.
++ {errorMessage(error)} +
+