This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/pages/404.tsx

31 lines
795 B
TypeScript

import type { GetStaticProps, NextPage } from "next"
import useTranslation from "next-translate/useTranslation"
import { ErrorPage } from "../components/ErrorPage"
import { Head } from "../components/Head"
import type { FooterProps } from "../components/Footer"
const Error404: NextPage<FooterProps> = (props) => {
const { t } = useTranslation()
const { version } = props
return (
<>
<Head title="Thream | 404" />
<ErrorPage
statusCode={404}
message={t("errors:page-not-found")}
version={version}
/>
</>
)
}
export const getStaticProps: GetStaticProps<FooterProps> = async () => {
const { readPackage } = await import("read-pkg")
const { version } = await readPackage()
return { props: { version } }
}
export default Error404