mango-v4-ui/pages/404.tsx

34 lines
984 B
TypeScript
Raw Normal View History

2022-10-23 20:58:14 -07:00
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { useTranslation } from 'next-i18next'
import { RektIcon } from '@components/icons/RektIcon'
export async function getStaticProps({ locale }: { locale: string }) {
return {
props: {
2022-12-16 03:26:42 -08:00
...(await serverSideTranslations(locale, [
'common',
'profile',
2023-01-10 18:46:18 -08:00
'search',
2022-12-16 03:26:42 -08:00
'settings',
])),
2022-10-23 20:58:14 -07:00
// Will be passed to the page component as props
},
}
}
export default function Custom404() {
const { t } = useTranslation('common')
return (
<div
className="mx-auto flex max-w-xl flex-col items-center justify-center text-center"
style={{ height: 'calc(100vh - 80px)' }}
>
2022-11-30 19:32:32 -08:00
<RektIcon className="mb-4 h-14 w-auto -rotate-6 transform text-th-down" />
2022-10-23 20:58:14 -07:00
<h1 className="mt-1 text-3xl text-th-fgd-1 sm:text-4xl">
404: {t('404-heading')}
</h1>
<p className="mt-2 text-lg">{t('404-description')}</p>
</div>
)
}