2023-10-23 23:33:39 +02:00
|
|
|
import type { GetStaticProps, NextPage } from "next"
|
|
|
|
import useTranslation from "next-translate/useTranslation"
|
2021-10-24 05:19:39 +02:00
|
|
|
|
2023-10-23 23:33:39 +02:00
|
|
|
import { ErrorPage } from "../components/ErrorPage"
|
|
|
|
import { Head } from "../components/Head"
|
|
|
|
import type { FooterProps } from "../components/Footer"
|
2021-10-24 05:19:39 +02:00
|
|
|
|
2021-12-28 16:06:58 +01:00
|
|
|
const Error404: NextPage<FooterProps> = (props) => {
|
2021-10-24 05:19:39 +02:00
|
|
|
const { t } = useTranslation()
|
2021-10-24 06:09:43 +02:00
|
|
|
const { version } = props
|
2021-10-24 05:19:39 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
2023-10-23 23:33:39 +02:00
|
|
|
<Head title="Thream | 404" />
|
2022-12-13 22:31:32 +01:00
|
|
|
<ErrorPage
|
|
|
|
statusCode={404}
|
2023-10-23 23:33:39 +02:00
|
|
|
message={t("errors:page-not-found")}
|
2022-12-13 22:31:32 +01:00
|
|
|
version={version}
|
|
|
|
/>
|
2021-10-24 05:19:39 +02:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-10-24 06:09:43 +02:00
|
|
|
export const getStaticProps: GetStaticProps<FooterProps> = async () => {
|
2023-10-23 23:33:39 +02:00
|
|
|
const { readPackage } = await import("read-pkg")
|
2021-10-24 06:09:43 +02:00
|
|
|
const { version } = await readPackage()
|
|
|
|
return { props: { version } }
|
2021-10-24 05:19:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Error404
|