2022-06-11 03:08:49 +00:00
|
|
|
import { NextPage, NextPageContext } from "next";
|
2022-06-05 15:35:35 +00:00
|
|
|
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-07-21 16:19:04 +00:00
|
|
|
import { ErrorBlock, ErrorMain } from "../components/generic/errors/renderers";
|
2022-06-11 03:08:49 +00:00
|
|
|
import { ViewNotice } from "../components/generic/views/notice";
|
|
|
|
import { Postcard } from "../components/postcard/changer";
|
2022-06-05 15:35:35 +00:00
|
|
|
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"]))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-06-11 03:08:49 +00:00
|
|
|
const Page404: NextPage = (props) => {
|
2022-06-09 21:43:38 +00:00
|
|
|
const { t } = useTranslation()
|
|
|
|
|
2022-06-05 15:35:35 +00:00
|
|
|
return <>
|
2022-06-11 03:08:49 +00:00
|
|
|
<Postcard
|
|
|
|
src={errorPostcard}
|
|
|
|
/>
|
2022-06-09 21:43:38 +00:00
|
|
|
<ViewNotice
|
2022-06-05 15:43:31 +00:00
|
|
|
notice={<>
|
2022-07-21 16:19:04 +00:00
|
|
|
<ErrorMain
|
2022-06-05 15:35:35 +00:00
|
|
|
text={t("notFoundError")}
|
|
|
|
error={new Error("HTTP 404 (Not found)")}
|
|
|
|
/>
|
2022-06-05 15:43:31 +00:00
|
|
|
<p>
|
2022-06-11 03:08:49 +00:00
|
|
|
<Link href="/"><a>
|
|
|
|
← {t("notFoundBackHome")}
|
|
|
|
</a></Link>
|
2022-06-05 15:43:31 +00:00
|
|
|
</p>
|
|
|
|
</>}
|
2022-06-05 15:35:35 +00:00
|
|
|
/>
|
|
|
|
</>
|
2022-06-11 03:08:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default Page404
|