accords-library.com/src/pages/chronicles/index.tsx

39 lines
1.1 KiB
TypeScript
Raw Normal View History

import SubPanel from "components/Panels/SubPanel";
import PanelHeader from "components/PanelComponents/PanelHeader";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
import AppLayout from "components/AppLayout";
type ChroniclesProps = {
langui: GetWebsiteInterfaceQuery;
};
export default function Chronicles(props: ChroniclesProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
const subPanel = (
<SubPanel>
<PanelHeader
icon="watch_later"
2022-02-16 18:44:05 +00:00
title={langui.main_chronicles}
description={langui.chronicles_description}
/>
</SubPanel>
);
2022-02-16 18:44:05 +00:00
return <AppLayout title={langui.main_chronicles} langui={langui} subPanel={subPanel} />;
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
const props: ChroniclesProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
};
return {
props: props,
};
}
return { props: {} };
};