mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-08 22:31:30 +01:00
33 lines
832 B
TypeScript
33 lines
832 B
TypeScript
import type { GetStaticProps, NextPage } from 'next'
|
|
import useTranslation from 'next-translate/useTranslation'
|
|
|
|
import { ErrorPage } from 'components/ErrorPage'
|
|
import { Head } from 'components/Head'
|
|
import type { FooterProps } from 'components/Footer'
|
|
|
|
interface Error404Props extends FooterProps {}
|
|
|
|
const Error404: NextPage<Error404Props> = (props) => {
|
|
const { t } = useTranslation()
|
|
const { version } = props
|
|
|
|
return (
|
|
<>
|
|
<Head title='404 | Divlo' />
|
|
<ErrorPage
|
|
statusCode={404}
|
|
message={t('errors:not-found')}
|
|
version={version}
|
|
/>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export const getStaticProps: GetStaticProps<Error404Props> = async () => {
|
|
const { readPackage } = await import('read-pkg')
|
|
const { version } = await readPackage()
|
|
return { props: { version } }
|
|
}
|
|
|
|
export default Error404
|