add generic page header component, person section component with headings, ++

This commit is contained in:
elisejakob
2024-05-12 20:53:34 +02:00
parent bf2008c7be
commit 022ed8c143
9 changed files with 114 additions and 27 deletions

View File

@ -0,0 +1,60 @@
import { graphql } from "@/gql";
import { VenueFragment } from "@/gql/graphql";
import { getClient } from "@/app/client";
import { VenueList } from "@/components/venues/VenueList";
import Link from "next/link";
import { PageHeader } from "@/components/general/PageHeader";
const VenueFragmentDefinition = graphql(`
fragment Venue on VenuePage {
__typename
id
slug
title
body {
id
blockType
field
... on RichTextBlock {
rawValue
value
}
}
featuredImage {
url
width
height
}
showAsBookable
floor
preposition
capabilityAudio
capabilityAudioVideo
capabilityBar
capabilityLighting
capacityLegal
capacityStanding
capacitySitting
}
`);
export default async function Page() {
const allVenuesQuery = graphql(`
query allVenues {
venues: pages(contentType: "venues.VenuePage") {
... on VenuePage {
...Venue
}
}
}
`);
const { data, error } = await getClient().query(allVenuesQuery, {});
const venues = (data?.venues ?? []) as VenueFragment[];
return (
<main className="site-main" id="main">
<PageHeader heading="Utleie" />
<VenueList venues={venues} />
</main>
);
}