1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-05 13:01:30 +01:00
.profile/components/ErrorPage.tsx

46 lines
1.3 KiB
TypeScript
Raw Normal View History

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
}
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
</>
)
}