add generic page header component, person section component with headings, ++
This commit is contained in:
60
web/src/app/utleie/page.tsx
Normal file
60
web/src/app/utleie/page.tsx
Normal 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>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user