1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-09 14:51:30 +01:00
.profile/pages/404.tsx
Divlo 1505b81233
build(deps): bump Node.js to 16.0.0 and npm to 8.0.0
BREAKING CHANGE: minimum supported Node.js >= 16.0.0 and npm >= 8.0.0

fixes #74
2022-02-20 15:12:10 +01:00

33 lines
908 B
TypeScript

import { GetStaticProps } from 'next'
import useTranslation from 'next-translate/useTranslation'
import { ErrorPage } from 'components/ErrorPage'
import { Head } from 'components/Head'
import { Header } from 'components/Header'
import { Footer, FooterProps } from 'components/Footer'
const Error404: React.FC<FooterProps> = (props) => {
const { t } = useTranslation()
const { version } = props
return (
<>
<Head title='Divlo - 404' />
<Header />
<main className='flex flex-col md:mx-auto md:max-w-4xl lg:max-w-7xl'>
<ErrorPage statusCode={404} message={t('errors:not-found')} />
</main>
<Footer version={version} />
</>
)
}
export const getStaticProps: GetStaticProps<FooterProps> = async () => {
const { readPackage } = await import('read-pkg')
const { version } = await readPackage()
return { props: { version } }
}
export default Error404