allow generic pages to have pigs
This commit is contained in:
@ -4,6 +4,7 @@ import { getClient } from "@/app/client";
|
||||
import { notFound } from "next/navigation";
|
||||
import { PageHeader } from "@/components/general/PageHeader";
|
||||
import { PageContent } from "@/components/general/PageContent";
|
||||
import { BgPig } from "@/components/general/BgPig";
|
||||
|
||||
export const dynamicParams = false;
|
||||
|
||||
@ -14,6 +15,7 @@ const GenericFragmentDefinition = graphql(`
|
||||
urlPath
|
||||
title
|
||||
lead
|
||||
pig
|
||||
body {
|
||||
...Blocks
|
||||
}
|
||||
@ -74,9 +76,12 @@ export default async function Page({ params }: { params: { url: string[] } }) {
|
||||
}
|
||||
|
||||
return (
|
||||
<main className="site-main" id="main">
|
||||
<PageHeader heading={page.title} lead={page.lead} />
|
||||
<PageContent blocks={page.body} />
|
||||
</main>
|
||||
<>
|
||||
<main className="site-main" id="main">
|
||||
<PageHeader heading={page.title} lead={page.lead} />
|
||||
<PageContent blocks={page.body} />
|
||||
</main>
|
||||
{page.pig && <BgPig type={page.pig} color="white" />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user