1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-23 07:04:22 +00:00
festa/pages/debug/error.tsx

37 lines
1.1 KiB
TypeScript
Raw Normal View History

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 { LoadingMain } from "../../components/generic/loading/renderers";
import { ViewNotice } from "../../components/generic/views/notice";
import { Postcard } from "../../components/postcard/changer";
import debugPostcard from "../../public/postcards/markus-spiske-iar-afB0QQw-unsplash.jpg"
export async function getStaticProps(context: NextPageContext) {
return {
props: {
...(await serverSideTranslations(context.locale ?? "it-IT", ["common"]))
}
}
}
2022-07-20 22:01:19 +00:00
const PageDebugError: NextPage = (props) => {
const { t } = useTranslation()
return <>
<Postcard
src={debugPostcard}
/>
<ViewNotice
notice={<>
<ErrorMain error={new Error("Example")} text={t("debugError")} />
</>}
/>
</>
}
2022-07-20 22:01:19 +00:00
export default PageDebugError