diff --git a/app/[locale]/(user)/events/[eventSlug]/page.tsx b/app/[locale]/(user)/events/[eventSlug]/page.tsx index fcdf7462..63a98061 100644 --- a/app/[locale]/(user)/events/[eventSlug]/page.tsx +++ b/app/[locale]/(user)/events/[eventSlug]/page.tsx @@ -23,7 +23,7 @@ export async function generateMetadata({ const result = await GraphQLPublic( eventBySlugQuery, {}, - { slug: eventSlug } + { publicId: eventSlug } ); const event = result.eventBySlug; const title = event?.name?.trim() || 'Event'; @@ -68,7 +68,7 @@ export default async function EventDetailPage({ const result = await GraphQLPublic( eventBySlugQuery, {}, - { slug: eventSlug } + { publicId: eventSlug } ).catch(() => null); const event = result?.eventBySlug; if (!event) notFound(); diff --git a/app/[locale]/(user)/events/queries.ts b/app/[locale]/(user)/events/queries.ts index 3b133ce5..36dca59b 100644 --- a/app/[locale]/(user)/events/queries.ts +++ b/app/[locale]/(user)/events/queries.ts @@ -31,10 +31,10 @@ export type PublicEvent = { export const eventBySlugQuery = operation< { eventBySlug?: PublicEvent | null }, - { slug: string } + { publicId: string } >(` - query EventBySlug($slug: String!) { - eventBySlug(slug: $slug) { + query EventBySlug($publicId: String!) { + eventBySlug(publicId: $publicId) { id name urlSlug