add 404 page (#344)

This commit is contained in:
saml33 2022-07-05 03:01:05 +10:00 committed by GitHub
parent 3a8b5c8f6a
commit 5a1eb75537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 59 additions and 0 deletions

File diff suppressed because one or more lines are too long

29
pages/404.tsx Normal file
View File

@ -0,0 +1,29 @@
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import { useTranslation } from 'next-i18next'
import { RektIcon } from '../components/icons'
export async function getStaticProps({ locale }) {
return {
props: {
...(await serverSideTranslations(locale, ['common', 'delegate'])),
// 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)' }}
>
<RektIcon className="mb-6 h-14 w-auto -rotate-6 transform text-th-red" />
<span className="text-lg font-bold text-th-fgd-4">404</span>
<h1 className="mt-1 text-3xl text-th-fgd-1 sm:text-4xl">
{t('404-heading')}
</h1>
<p className="mt-2 text-lg text-th-fgd-4">{t('404-description')}</p>
</div>
)
}

View File

@ -1,5 +1,7 @@
{
"30-day": "30-day",
"404-heading": "This page was liquidated",
"404-description": "or, never existed...",
"about-to-withdraw": "You're about to withdraw",
"above": "Above",
"accept": "Accept",

View File

@ -1,5 +1,7 @@
{
"30-day": "30-day",
"404-heading": "This page was liquidated",
"404-description": "or, never existed...",
"about-to-withdraw": "Estas a punto de retirar",
"above": "Encima",
"accept": "Aceptar",

View File

@ -1,5 +1,7 @@
{
"30-day": "30天",
"404-heading": "This page was liquidated",
"404-description": "or, never existed...",
"about-to-withdraw": "您正在取款",
"above": "高于",
"accept": "接受",

View File

@ -1,5 +1,7 @@
{
"30-day": "30天",
"404-heading": "This page was liquidated",
"404-description": "or, never existed...",
"about-to-withdraw": "您正在取款",
"above": "高於",
"accept": "接受",