show some featured images
This commit is contained in:
@ -2,6 +2,7 @@ import { graphql } from "@/gql";
|
||||
import { EventFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { Blocks } from "@/components/blocks/Blocks";
|
||||
import Image from "@/components/general/Image";
|
||||
|
||||
export async function generateStaticParams() {
|
||||
const allEventSlugsQuery = graphql(`
|
||||
@ -40,6 +41,15 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
<main className="site-main" id="main">
|
||||
<section className="page-header">
|
||||
<h1>{event.title}</h1>
|
||||
{event.featuredImage && (
|
||||
<Image
|
||||
src={event.featuredImage.url}
|
||||
alt=""
|
||||
width={event.featuredImage.width}
|
||||
height={event.featuredImage.height}
|
||||
sizes="100vw"
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
<section className="page-content">
|
||||
<Blocks blocks={event.body} />
|
||||
|
@ -19,7 +19,9 @@ const EventFragmentDefinition = graphql(`
|
||||
}
|
||||
}
|
||||
featuredImage {
|
||||
src
|
||||
url
|
||||
width
|
||||
height
|
||||
}
|
||||
facebookUrl
|
||||
ticketUrl
|
||||
|
Reference in New Issue
Block a user