2021-12-23 22:07:20 +00:00
|
|
|
import Link from "next/link";
|
|
|
|
import ContentPanel from "components/Panels/ContentPanel";
|
2022-01-01 02:31:55 +00:00
|
|
|
import { applyCustomAppProps } from "./_app";
|
2022-01-01 19:04:48 +00:00
|
|
|
import Head from "next/head";
|
2022-02-12 10:02:22 +00:00
|
|
|
import { getWebsiteInterface } from "graphql/operations";
|
|
|
|
import { GetStaticProps } from "next";
|
|
|
|
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
|
|
|
|
import MainPanel from "components/Panels/MainPanel";
|
2021-12-23 22:07:20 +00:00
|
|
|
|
2022-01-01 02:31:55 +00:00
|
|
|
applyCustomAppProps(FourOhFour, {
|
|
|
|
useSubPanel: false,
|
|
|
|
useContentPanel: true,
|
|
|
|
});
|
|
|
|
|
2022-02-12 10:02:22 +00:00
|
|
|
type Props = {
|
|
|
|
langui: GetWebsiteInterfaceQuery;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default function FourOhFour(props: Props): JSX.Element {
|
|
|
|
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
2021-12-23 22:07:20 +00:00
|
|
|
return (
|
2022-01-01 19:04:48 +00:00
|
|
|
<>
|
|
|
|
<Head>
|
|
|
|
<title>Accord’s Library - 404</title>
|
|
|
|
</Head>
|
2022-02-12 10:02:22 +00:00
|
|
|
<MainPanel langui={langui} />
|
2022-01-01 19:04:48 +00:00
|
|
|
<ContentPanel>
|
|
|
|
<h1>404 - Page Not Found</h1>
|
|
|
|
<Link href="/">
|
|
|
|
<a>Go back home</a>
|
|
|
|
</Link>
|
|
|
|
</ContentPanel>
|
|
|
|
</>
|
2021-12-23 22:07:20 +00:00
|
|
|
);
|
|
|
|
}
|
2022-02-12 10:02:22 +00:00
|
|
|
|
|
|
|
export const getStaticProps: GetStaticProps = async (context) => {
|
|
|
|
if (context.locale) {
|
|
|
|
const props: Props = {
|
|
|
|
langui: await getWebsiteInterface({
|
|
|
|
language_code: context.locale,
|
|
|
|
}),
|
|
|
|
};
|
|
|
|
return {
|
|
|
|
props: props,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
return { props: {} };
|
|
|
|
};
|