frontend/pages/_error.tsx (view raw)
1import {useTranslation} from 'react-i18next';
2import Box from '@mui/material/Box';
3import Typography from '@mui/material/Typography';
4import pageUtils from '../lib/pageUtils';
5
6interface Props {
7 statusCode: number;
8 title?: string;
9}
10
11const NotFoundPage = (props: Props) => {
12 const {t} = useTranslation();
13 const {statusCode = 404, title = t`generic.errors.not_found`} = props;
14
15 return (
16 <Box
17 display="flex"
18 justifyContent="center"
19 alignItems="center"
20 width="100vw"
21 height="100vh"
22 >
23 <Typography variant="overline">
24 {statusCode} - {title}
25 </Typography>
26 </Box>
27 );
28};
29
30
31export const getServerSideProps = pageUtils.getServerSideProps();
32export default NotFoundPage;