2022-06-05 15:35:35 +00:00
|
|
|
import { NextPageContext } from "next";
|
|
|
|
import { useTranslation } from "next-i18next";
|
|
|
|
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
|
|
|
|
import { ErrorBlock } from "../components/errors/ErrorBlock";
|
2022-06-09 21:43:38 +00:00
|
|
|
import { usePostcardImage } from "../components/postcard/usePostcardImage";
|
2022-06-05 15:35:35 +00:00
|
|
|
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 Page500() {
|
2022-06-09 21:43:38 +00:00
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
usePostcardImage(`url(${errorPostcard.src})`)
|
2022-06-05 15:35:35 +00:00
|
|
|
|
|
|
|
return <>
|
2022-06-09 21:43:38 +00:00
|
|
|
<ViewNotice
|
2022-06-05 15:35:35 +00:00
|
|
|
notice={
|
|
|
|
<ErrorBlock
|
|
|
|
text={t("internalServerError")}
|
|
|
|
error={new Error("HTTP 500 (Internal server error)")}
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
}
|