2022-06-05 15:35:35 +00:00
|
|
|
import { NextPageContext } from "next";
|
|
|
|
import { useTranslation } from "next-i18next";
|
|
|
|
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
|
2022-06-08 02:52:41 +00:00
|
|
|
import { default as Link } from "next/link";
|
2022-06-05 15:35:35 +00:00
|
|
|
import { ErrorBlock } from "../components/errors/ErrorBlock";
|
|
|
|
import { Postcard } from "../components/postcard/Postcard";
|
|
|
|
import { ViewNotice } from "../components/view/ViewNotice";
|
|
|
|
import errorPostcard from "../public/postcards/markus-spiske-iar-afB0QQw-unsplash-red.jpg"
|
|
|
|
|
|
|
|
|
|
|
|
export async function getStaticProps(context: NextPageContext) {
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
...(await serverSideTranslations(context.locale ?? "it-IT", ["common"]))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default function Page404() {
|
|
|
|
const {t} = useTranslation()
|
|
|
|
|
|
|
|
return <>
|
|
|
|
<Postcard src={errorPostcard.src}/>
|
|
|
|
<ViewNotice
|
2022-06-05 15:43:31 +00:00
|
|
|
notice={<>
|
2022-06-05 15:35:35 +00:00
|
|
|
<ErrorBlock
|
|
|
|
text={t("notFoundError")}
|
|
|
|
error={new Error("HTTP 404 (Not found)")}
|
|
|
|
/>
|
2022-06-05 15:43:31 +00:00
|
|
|
<p>
|
|
|
|
<Link href="/"><a>← {t("notFoundBackHome")}</a></Link>
|
|
|
|
</p>
|
|
|
|
</>}
|
2022-06-05 15:35:35 +00:00
|
|
|
/>
|
|
|
|
</>
|
|
|
|
}
|