add custom image model, fetch alt text
This commit is contained in:
@@ -37,6 +37,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
}
|
||||
`);
|
||||
|
||||
|
||||
const { data, error } = await getClient().query(eventBySlugQuery, {
|
||||
slug: params.slug,
|
||||
});
|
||||
|
@@ -51,7 +51,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
{association.logo && (
|
||||
<Image
|
||||
src={association.logo.url}
|
||||
alt=""
|
||||
alt={`Logoen til ${association.title}`}
|
||||
width={association.logo.width}
|
||||
height={association.logo.height}
|
||||
sizes="100vw"
|
||||
|
@@ -48,7 +48,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
|
||||
{venue.featuredImage && (
|
||||
<Image
|
||||
src={venue.featuredImage.url}
|
||||
alt=""
|
||||
alt={venue.featuredImage.alt}
|
||||
width={venue.featuredImage.width}
|
||||
height={venue.featuredImage.height}
|
||||
sizes="100vw"
|
||||
|
@@ -21,9 +21,7 @@ const VenueFragmentDefinition = graphql(`
|
||||
}
|
||||
}
|
||||
featuredImage {
|
||||
url
|
||||
width
|
||||
height
|
||||
...Image
|
||||
}
|
||||
showAsBookable
|
||||
floor
|
||||
|
@@ -6,39 +6,6 @@ import Link from "next/link";
|
||||
import { PageHeader } from "@/components/general/PageHeader";
|
||||
import { BgPig } from "@/components/general/BgPig";
|
||||
|
||||
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 {
|
||||
|
Reference in New Issue
Block a user