2021-04-18 01:56:23 +02:00
|
|
|
import useTranslation from 'next-translate/useTranslation'
|
|
|
|
import Link from 'next/link'
|
|
|
|
|
2022-10-03 20:52:15 +02:00
|
|
|
import type { FooterProps } from './Footer'
|
|
|
|
import { Footer } from './Footer'
|
|
|
|
import { Header } from './Header'
|
|
|
|
|
|
|
|
export interface ErrorPageProps extends FooterProps {
|
2021-04-18 01:56:23 +02:00
|
|
|
statusCode: number
|
|
|
|
message: string
|
|
|
|
}
|
|
|
|
|
2021-05-08 19:52:04 +02:00
|
|
|
export const ErrorPage: React.FC<ErrorPageProps> = (props) => {
|
2022-10-03 20:52:15 +02:00
|
|
|
const { message, statusCode, version } = props
|
2021-04-18 01:56:23 +02:00
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
2022-10-03 20:52:15 +02:00
|
|
|
<div className='flex h-screen flex-col pt-0'>
|
|
|
|
<Header showLanguage />
|
|
|
|
<main className='flex min-w-full flex-1 flex-col items-center justify-center'>
|
|
|
|
<h1 className='my-6 text-4xl font-semibold'>
|
|
|
|
{t('errors:error')}{' '}
|
|
|
|
<span
|
|
|
|
className='text-yellow dark:text-yellow-dark'
|
|
|
|
data-cy='status-code'
|
|
|
|
>
|
|
|
|
{statusCode}
|
|
|
|
</span>
|
|
|
|
</h1>
|
|
|
|
<p className='text-center text-lg'>
|
|
|
|
{message}{' '}
|
2022-10-27 19:13:29 +02:00
|
|
|
<Link
|
|
|
|
href='/'
|
|
|
|
className='text-yellow hover:underline dark:text-yellow-dark'
|
|
|
|
>
|
|
|
|
{t('errors:return-to-home-page')}
|
2022-10-03 20:52:15 +02:00
|
|
|
</Link>
|
|
|
|
</p>
|
|
|
|
</main>
|
|
|
|
<Footer version={version} />
|
|
|
|
</div>
|
2021-04-18 01:56:23 +02:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|