2021-11-13 20:26:18 +00:00
|
|
|
import SubPanel from "components/Panels/SubPanel";
|
2022-01-03 02:40:54 +00:00
|
|
|
import PanelHeader from "components/PanelComponents/PanelHeader";
|
2022-02-12 10:02:22 +00:00
|
|
|
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
|
|
|
|
import { GetStaticProps } from "next";
|
|
|
|
import { getWebsiteInterface } from "graphql/operations";
|
2022-02-15 14:50:51 +00:00
|
|
|
import AppLayout from "components/AppLayout";
|
2021-11-06 16:47:20 +00:00
|
|
|
|
2022-02-15 14:50:51 +00:00
|
|
|
type ChroniclesProps = {
|
2022-02-12 10:02:22 +00:00
|
|
|
langui: GetWebsiteInterfaceQuery;
|
|
|
|
};
|
|
|
|
|
2022-02-15 14:50:51 +00:00
|
|
|
export default function Chronicles(props: ChroniclesProps): JSX.Element {
|
2022-02-12 10:02:22 +00:00
|
|
|
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
2022-02-15 14:50:51 +00:00
|
|
|
const subPanel = (
|
|
|
|
<SubPanel>
|
|
|
|
<PanelHeader
|
|
|
|
icon="watch_later"
|
2022-02-16 18:44:05 +00:00
|
|
|
title={langui.main_chronicles}
|
|
|
|
description={langui.chronicles_description}
|
2022-02-15 14:50:51 +00:00
|
|
|
/>
|
|
|
|
</SubPanel>
|
2021-11-13 20:26:18 +00:00
|
|
|
);
|
2022-02-16 18:44:05 +00:00
|
|
|
return <AppLayout title={langui.main_chronicles} langui={langui} subPanel={subPanel} />;
|
2022-01-01 02:31:55 +00:00
|
|
|
}
|
2022-02-12 10:02:22 +00:00
|
|
|
|
|
|
|
export const getStaticProps: GetStaticProps = async (context) => {
|
|
|
|
if (context.locale) {
|
2022-02-15 14:50:51 +00:00
|
|
|
const props: ChroniclesProps = {
|
2022-02-12 10:02:22 +00:00
|
|
|
langui: await getWebsiteInterface({
|
|
|
|
language_code: context.locale,
|
|
|
|
}),
|
|
|
|
};
|
|
|
|
return {
|
|
|
|
props: props,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
return { props: {} };
|
|
|
|
};
|