feat: add 404 and 500 pages

This commit is contained in:
MedzikUser 2022-06-15 14:58:33 +02:00
parent 4883e505f1
commit 475fee14a3
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
2 changed files with 39 additions and 0 deletions

23
pages/404.tsx Normal file
View File

@ -0,0 +1,23 @@
import Head from 'next/head'
import { Home } from '@mui/icons-material'
import { IconButton } from '@mui/material'
import config from '../config'
import Title from '../components/title'
import Container from '../components/container'
export default function NotFoundPage() {
return (
<Container>
<Head>
<title>404 | {config.title}</title>
</Head>
<Title>404 | This page could not be found</Title>
<IconButton color="inherit" href="/">
<Home />
</IconButton>
</Container>
)
}

16
pages/500.tsx Normal file
View File

@ -0,0 +1,16 @@
import Head from 'next/head'
import config from '../config'
import Title from '../components/title'
import Container from '../components/container'
export default function NotFoundPage() {
return (
<Container>
<Head>
<title>500 | {config.title}</title>
</Head>
<Title>500 | Server-side error occurred</Title>
</Container>
)
}