1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-14 16:13:14 +01:00
.profile/pages/404.tsx

33 lines
899 B
TypeScript
Raw Normal View History

2021-04-18 01:56:23 +02:00
import { GetStaticProps } from 'next'
import useTranslation from 'next-translate/useTranslation'
2021-07-27 13:36:35 +02:00
import readPackageJSON from 'read-pkg'
2021-04-18 01:56:23 +02:00
import { ErrorPage } from 'components/ErrorPage'
2021-04-18 23:13:54 +02:00
import { Head } from 'components/Head'
2021-07-27 13:36:35 +02:00
import { Header } from 'components/Header'
import { Footer, FooterProps } from 'components/Footer'
2021-04-18 01:56:23 +02:00
2021-07-27 13:36:35 +02:00
const Error404: React.FC<FooterProps> = (props) => {
2021-04-18 01:56:23 +02:00
const { t } = useTranslation()
2021-07-27 13:36:35 +02:00
const { version } = props
2021-04-18 01:56:23 +02:00
return (
<>
<Head title='Divlo - 404' />
2021-07-27 13:36:35 +02:00
<Header />
<main className='flex flex-col md:mx-auto md:max-w-4xl lg:max-w-7xl'>
<ErrorPage statusCode={404} message={t('errors:notFound')} />
</main>
<Footer version={version} />
2021-04-18 01:56:23 +02:00
</>
)
}
2021-07-27 13:36:35 +02:00
export const getStaticProps: GetStaticProps<FooterProps> = async () => {
const { version } = await readPackageJSON()
return { props: { version } }
2021-04-18 01:56:23 +02:00
}
export default Error404