web: add prices and links to event page
This commit is contained in:
@ -30,10 +30,13 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
}
|
||||
`);
|
||||
|
||||
const { data } = await getClient().query(eventBySlugQuery, {
|
||||
const { data, error } = await getClient().query(eventBySlugQuery, {
|
||||
slug: params.slug,
|
||||
});
|
||||
|
||||
// console.log('data', data)
|
||||
// console.log('error', error)
|
||||
|
||||
const event = (data?.event ?? {}) as EventFragment;
|
||||
|
||||
console.log("event", event);
|
||||
@ -45,6 +48,11 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
</section>
|
||||
<section className="page-content">
|
||||
<Blocks blocks={event.body} />
|
||||
<div>Facebook: {event.facebookUrl}</div>
|
||||
<div>Billettlenke: {event.ticketUrl}</div>
|
||||
<div>Ordinær pris: {event.priceRegular}</div>
|
||||
<div>Studentpris: {event.priceStudent}</div>
|
||||
<div>Medlemspris: {event.priceMember}</div>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
|
@ -25,7 +25,7 @@ const EventFragmentDefinition = graphql(`
|
||||
ticketUrl
|
||||
priceRegular
|
||||
priceMember
|
||||
priceRegular
|
||||
priceStudent
|
||||
}
|
||||
`);
|
||||
|
||||
|
Reference in New Issue
Block a user