2021-04-18 01:56:23 +02:00
|
|
|
import Link from 'next/link'
|
|
|
|
|
2023-07-31 19:06:46 +02:00
|
|
|
import { getI18n } from '@/i18n/i18n.server'
|
2022-10-03 20:52:15 +02:00
|
|
|
|
2023-07-31 19:06:46 +02:00
|
|
|
export interface ErrorPageProps {
|
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) => {
|
2023-07-31 19:06:46 +02:00
|
|
|
const { message, statusCode } = props
|
|
|
|
const i18n = getI18n()
|
2021-04-18 01:56:23 +02:00
|
|
|
|
|
|
|
return (
|
2023-07-31 19:06:46 +02:00
|
|
|
<main className='flex flex-col flex-1 items-center justify-center'>
|
|
|
|
<h1 className='my-6 text-4xl font-semibold'>
|
|
|
|
{i18n.translate('errors.error')}{' '}
|
|
|
|
<span
|
|
|
|
className='text-yellow dark:text-yellow-dark'
|
|
|
|
data-cy='status-code'
|
|
|
|
>
|
|
|
|
{statusCode}
|
|
|
|
</span>
|
|
|
|
</h1>
|
|
|
|
<p className='text-center text-lg'>
|
|
|
|
{message}{' '}
|
|
|
|
<Link
|
|
|
|
href='/'
|
|
|
|
className='text-yellow hover:underline dark:text-yellow-dark'
|
|
|
|
>
|
|
|
|
{i18n.translate('errors.return-to-home-page')}
|
|
|
|
</Link>
|
|
|
|
</p>
|
|
|
|
</main>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|