Skip to content

Commit

Permalink
Merge branch 'frontend' into scoresEnVakken
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendemeurichy authored Mar 13, 2024
2 parents 1fc581c + 548e8a3 commit d53efa9
Show file tree
Hide file tree
Showing 10 changed files with 594 additions and 66 deletions.
8 changes: 8 additions & 0 deletions frontend/frontend/.vite/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hash": "ea10a7bd",
"configHash": "baf76694",
"lockfileHash": "e3b0c442",
"browserHash": "89947c23",
"optimized": {},
"chunks": {}
}
3 changes: 3 additions & 0 deletions frontend/frontend/.vite/deps/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
134 changes: 103 additions & 31 deletions frontend/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions frontend/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@fontsource/roboto": "^5.0.8",
"@mui/icons-material": "^5.15.11",
"@mui/material": "^5.15.11",
"@mui/material": "^5.15.12",
"@mui/x-date-pickers": "^6.19.6",
"axios": "^1.6.7",
"dayjs": "^1.11.10",
"i18next": "^23.10.0",
"i18next-browser-languagedetector": "^7.2.0",
"i18next-http-backend": "^2.5.0",
Expand All @@ -26,8 +28,7 @@
"react-helmet": "^6.1.0",
"react-helmet-async": "^2.0.4",
"react-i18next": "^14.0.5",
"react-router-dom": "^6.22.2",
"sort-by": "^1.2.0"
"react-router-dom": "^6.22.2"
},
"devDependencies": {
"@types/react": "^18.2.56",
Expand Down
32 changes: 16 additions & 16 deletions frontend/frontend/src/Theme.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import {createTheme} from "@mui/material";

const theme = createTheme({
palette:{
primary:{
main:'#1E64C8',
contrastText:'#FCF8FD'
palette: {
primary: {
main: '#1E64C8',
contrastText: '#FCF8FD'
},
secondary:{
main:'#D0E4FF',
contrastText:'#47464A'
secondary: {
main: '#D0E4FF',
contrastText: '#47464A'
},
background:{
default:'#FCF8FD',
background: {
default: '#FCF8FD',
},
text:{
primary:'#47464A',
secondary:'#FCF8FD'
text: {
primary: '#47464A',
secondary: '#898991'
},
error:{
main:'#FF5445'
error: {
main: '#FF5445'
},
success:{
main:'#81A476'
success: {
main: '#81A476'
}
},
});
Expand Down
58 changes: 43 additions & 15 deletions frontend/frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ import ReactDOM from "react-dom/client";
import {ThemeProvider} from "@mui/material";
import theme from "./Theme.ts";
import "./i18n/config.ts";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import {createBrowserRouter, RouterProvider} from "react-router-dom";
import ErrorPage from "./pages/ErrorPage.tsx";

import {MainPage} from "./pages/mainPage/MainPage.tsx";
import {Helmet, HelmetProvider} from "react-helmet-async";

import { SubjectsStudentPage } from "./pages/subjectsPage/SubjectsStudentPage.tsx";
import { SubjectsTeacherPage } from "./pages/subjectsPage/SubjectsTeacherPage.tsx";
import { ProjectScoresPage } from "./pages/scoresPage/ProjectScoresPage.tsx";

import { SubjectsStudentPage } from "./pages/subjects_page/SubjectsStudentPage.tsx";
import { AssignmentStudentPage } from "./pages/assignmentPage/assignmentStudentPage";
import { AssignmentTeacherPage } from "./pages/assignmentPage/assignmentTeacherPage.tsx";
import { GroupsPage } from "./pages/groupsPage/groupsPage.tsx";
import {SubjectsStudentPage} from "./pages/subjects_page/SubjectsStudentPage.tsx";
import {SimpleRequestsPage} from "./pages/simpleRequestsPage/SimpleRequestsPage.tsx";

const router = createBrowserRouter([
{
Expand All @@ -24,27 +30,49 @@ const router = createBrowserRouter([
element: <SubjectsStudentPage />,
},
{

path: "/subjects_teacher/:courseId",
element: <SubjectsTeacherPage />,
},
{
path: "/scores",
element: <ProjectScoresPage />,
},

path: "/assignment_student",
element: <AssignmentStudentPage />,
},
{
path: "/assignment_teacher",
element: <AssignmentTeacherPage/>,
},
{
path: "/groups",
element: <GroupsPage/>,
},
{
path: "/subjects_student",
element: <SubjectsStudentPage/>,
},
{
path: "/test_requests",
element: <SimpleRequestsPage/>,
}

]);

ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<HelmetProvider>
<Helmet>
<style>{`body { background-color: ${theme.palette.background.default}; }`}</style>
</Helmet>

<React.Suspense fallback={<div>Loading...</div>}>
<ThemeProvider theme={theme}>
<RouterProvider router={router} />
</ThemeProvider>
</React.Suspense>
</HelmetProvider>
</React.StrictMode>
<React.StrictMode>
<HelmetProvider>
<Helmet>
<style>{`body { background-color: ${theme.palette.background.default}; }`}</style>
</Helmet>

<React.Suspense fallback={<div>Loading...</div>}>
<ThemeProvider theme={theme}>
<RouterProvider router={router}/>
</ThemeProvider>
</React.Suspense>
</HelmetProvider>
</React.StrictMode>
);
Loading

0 comments on commit d53efa9

Please sign in to comment.