Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error pages #93

Merged
merged 25 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
257eac3
initial draft for error pages
Matisse-Sulzer Mar 13, 2024
51f8240
indentation fixed
Matisse-Sulzer Mar 13, 2024
044f6d7
docs
Matisse-Sulzer Mar 13, 2024
983c721
error pages v1
Matisse-Sulzer Mar 14, 2024
5c51757
indentation fixed
Matisse-Sulzer Mar 14, 2024
2e0f86e
layout adjusted, using RouterProvider instead of BrowserRouter to ren…
Matisse-Sulzer Mar 21, 2024
3b7cb88
linter
Matisse-Sulzer Mar 21, 2024
9a2b0a5
documentation
Matisse-Sulzer Mar 28, 2024
20c0d8d
Merge branch 'development' into frontend/enhancement/error_pages
Matisse-Sulzer Mar 28, 2024
d8034f9
Merge branch 'development' of https://github.com/SELab-2/UGent-3 into…
Matisse-Sulzer Mar 28, 2024
a47932e
Merge branch 'frontend/enhancement/error_pages' of https://github.com…
Matisse-Sulzer Mar 28, 2024
32e501e
linter error parameters
Matisse-Sulzer Mar 28, 2024
e1a9140
Merge branch 'development' into frontend/enhancement/error_pages
Matisse-Sulzer Mar 31, 2024
0c632c0
Added i18n, changed general structure of App component and got rid of…
Matisse-Sulzer Apr 13, 2024
8471fd6
Merge branch 'development' into frontend/enhancement/error_pages
Matisse-Sulzer Apr 13, 2024
8d5178c
linting, package-lock.json fix
Matisse-Sulzer Apr 13, 2024
246cec7
package file
Matisse-Sulzer Apr 13, 2024
8baecd8
changes to paramters in ErrorPage.tsx
Matisse-Sulzer Apr 14, 2024
df75fd5
Merge branch 'development' into frontend/enhancement/error_pages
Matisse-Sulzer Apr 14, 2024
28066ff
Merge branch 'development' into frontend/enhancement/error_pages
Matisse-Sulzer Apr 15, 2024
04c19cb
use of keyPrefix
Matisse-Sulzer Apr 18, 2024
775b6b4
Merge branch 'development' into frontend/enhancement/error_pages
Matisse-Sulzer Apr 18, 2024
7a6c25c
Merge branch 'development' into frontend/enhancement/error_pages
Matisse-Sulzer Apr 18, 2024
7634577
keyPrefix
Matisse-Sulzer Apr 18, 2024
3cc8257
fix
Matisse-Sulzer Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 41 additions & 13 deletions frontend/package-lock.json

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

3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
"@mui/styled-engine-sc": "^6.0.0-alpha.16",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.1",
"react-router-dom": "^6.22.3",
"styled-components": "^6.1.8"
},
"devDependencies": {
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"@types/react-router-dom": "^5.3.3",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react": "^4.2.1",
Expand Down
Binary file added frontend/public/error_pigeon.png
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, just make sure there is no copy right on this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image is free of copyright. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { BrowserRouter, Route, Routes } from "react-router-dom";
import Home from "./pages/home/Home";
import { Header } from "./components/Header/Header";
import { NotFound } from "./pages/error/NotFound";

/**
* This component is the main application component that will be rendered by the ReactDOM.
Expand All @@ -12,6 +13,7 @@ function App(): JSX.Element {
<Header />
<Routes>
<Route index element={<Home />} />
<Route path="*" element={<NotFound />} />
</Routes>
</BrowserRouter>
);
Expand Down
22 changes: 22 additions & 0 deletions frontend/src/pages/error/NotFound.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Box, Typography } from "@mui/material";

/**
* This component is the NotFound component that will be rendered when a page is not found.
* @returns - The NotFound component
*/
export function NotFound() {
return (
<Box sx={{ flexGrow: 1 }}>
<Typography variant="h1">
404
</Typography>
<Typography variant="h3">
Page Not Found
</Typography>
<Typography variant="body1">
Sorry, the page you are looking for could not be found.
</Typography>
<Box component="img" src="/error_pigeon.png" alt="icon" />
</Box>
);
}
22 changes: 22 additions & 0 deletions frontend/src/pages/error/ServerError.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Box, Typography } from "@mui/material";

/**
* This component is the ServerError component that will be rendered when a general server error occurs.
* @returns - The ServerError component
*/
export function ServerError() {
return (
<Box sx={{ flexGrow: 1 }}>
<Typography variant="h1">
5XX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use 5XX, figure out the actual status code

</Typography>
<Typography variant="h3">
General Server Error
</Typography>
<Typography variant="body1">
Sorry, there seems to be a problem with the server.
</Typography>
<Box component="img" src="/error_pigeon.png" alt="icon" />
</Box>
);
}
Loading