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

49 lines
1.5 KiB
TypeScript
Raw Normal View History

import SubPanel from "components/Panels/SubPanel";
import { applyCustomAppProps } from "pages/_app";
import PanelHeader from "components/PanelComponents/PanelHeader";
import MainPanel from "components/Panels/MainPanel";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
2022-02-14 04:49:43 +00:00
import ContentPanel from "components/Panels/ContentPanel";
2022-02-14 04:49:43 +00:00
applyCustomAppProps(Chronicles, {
useSubPanel: true,
2022-02-14 04:49:43 +00:00
useContentPanel: true,
});
type Props = {
langui: GetWebsiteInterfaceQuery;
};
2022-02-14 04:49:43 +00:00
export default function Chronicles(props: Props): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
return (
<>
<MainPanel langui={langui} />
<SubPanel>
<PanelHeader
icon="watch_later"
2022-02-14 04:49:43 +00:00
title="Chronicles"
description="Reiciendis id reiciendis at ullam. Corrupti voluptatibus quo magnam enim voluptas eaque. Quia id consequatur fuga magni. Voluptate eaque pariatur porro voluptate rerum. Harum velit in laborum eligendi. Nihil eius dolor et omnis."
/>
</SubPanel>
2022-02-14 04:49:43 +00:00
<ContentPanel>Hello</ContentPanel>
</>
);
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
const props: Props = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
};
return {
props: props,
};
}
return { props: {} };
};