mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-22 14:44:21 +00:00
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { NextPage, NextPageContext } from "next";
|
|
import { useTranslation } from "next-i18next";
|
|
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
|
|
import { ErrorBlock, ErrorMain } from "../components/generic/errors/renderers";
|
|
import { ViewNotice } from "../components/generic/views/notice";
|
|
import { Postcard } from "../components/postcard/changer";
|
|
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"]))
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
const Page500: NextPage = (props) => {
|
|
const { t } = useTranslation()
|
|
|
|
return <>
|
|
<Postcard
|
|
src={errorPostcard}
|
|
/>
|
|
<ViewNotice
|
|
notice={<>
|
|
<ErrorMain
|
|
text={t("internalServerError")}
|
|
error={new Error("HTTP 500 (Internal server error)")}
|
|
/>
|
|
</>}
|
|
/>
|
|
</>
|
|
}
|
|
|
|
|
|
export default Page500
|