2022-08-31 21:44:33 +02:00
|
|
|
import type { GetStaticProps, NextPage } from 'next'
|
2021-10-24 05:19:39 +02:00
|
|
|
import useTranslation from 'next-translate/useTranslation'
|
|
|
|
|
2022-03-16 12:18:09 +01:00
|
|
|
import { ErrorPage } from '../components/ErrorPage'
|
|
|
|
import { Head } from '../components/Head'
|
|
|
|
import { Header } from '../components/Header'
|
2022-08-31 21:44:33 +02:00
|
|
|
import type { FooterProps } from '../components/Footer'
|
2021-10-24 05:19:39 +02:00
|
|
|
|
2021-12-28 16:06:58 +01:00
|
|
|
const Error500: NextPage<FooterProps> = (props) => {
|
2021-10-24 05:19:39 +02:00
|
|
|
const { t } = useTranslation()
|
2021-10-24 06:09:43 +02:00
|
|
|
const { version } = props
|
2021-10-24 05:19:39 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
2022-02-19 23:20:33 +01:00
|
|
|
<Head title='Thream | 500' />
|
2021-10-24 05:19:39 +02:00
|
|
|
|
2021-10-24 05:48:06 +02:00
|
|
|
<Header />
|
2022-12-13 22:31:32 +01:00
|
|
|
<ErrorPage
|
|
|
|
statusCode={500}
|
|
|
|
message={t('errors:server-error')}
|
|
|
|
version={version}
|
|
|
|
/>
|
2021-10-24 05:19:39 +02:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-10-24 06:09:43 +02:00
|
|
|
export const getStaticProps: GetStaticProps<FooterProps> = async () => {
|
|
|
|
const { readPackage } = await import('read-pkg')
|
|
|
|
const { version } = await readPackage()
|
|
|
|
return { props: { version } }
|
2021-10-24 05:19:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Error500
|