@@ -9,6 +9,9 @@ import JsonLd from '@/components/JsonLd'
99import MarkdownContent from '@/components/MarkdownContent'
1010import ArtistCard from '@/components/artists/ArtistCard'
1111import EventTimetable from '@/components/events/EventTimetable'
12+ import NoirDonateSection from '@/components/noir/sections/NoirDonateSection'
13+ import { getHomepageSections } from '@/lib/sections'
14+ import type { NoirDonateContent } from '@/lib/noir-home-defaults'
1215
1316export const dynamic = 'force-dynamic'
1417
@@ -23,10 +26,6 @@ function formatRange(start: Date, end: Date | null): string {
2326 return `${ dayFmt . format ( start ) } – ${ fmt . format ( end ) } `
2427}
2528
26- function formatPrice ( price : number | null , currency : string ) : string {
27- if ( price === null ) return 'auf Anfrage'
28- return new Intl . NumberFormat ( 'de-DE' , { style : 'currency' , currency } ) . format ( price )
29- }
3029
3130export async function generateMetadata ( { params } : Props ) : Promise < Metadata > {
3231 const { slug } = await params
@@ -44,6 +43,10 @@ export default async function EventDetailPage({ params }: Props) {
4443 const event = await getEvent ( slug )
4544 if ( ! event ) notFound ( )
4645
46+ // Reuse the homepage's "Spenden & Tickets" content so the section matches 1:1.
47+ const sections = await getHomepageSections ( )
48+ const donateContent = ( sections . find ( ( s ) => s . type === 'noir_donate' ) ?. content ?? null ) as NoirDonateContent | null
49+
4750 const lineup = event . appearances . filter ( ( a ) => a . artist )
4851 const seenArtists = new Set < string > ( )
4952 const uniqueLineup = lineup . filter ( ( a ) => {
@@ -53,6 +56,7 @@ export default async function EventDetailPage({ params }: Props) {
5356 } )
5457
5558 return (
59+ < >
5660 < div className = "mx-auto max-w-4xl px-4 py-14 sm:px-6 lg:px-8" >
5761 < JsonLd
5862 data = { buildEventJsonLd ( {
@@ -113,30 +117,6 @@ export default async function EventDetailPage({ params }: Props) {
113117 </ section >
114118 ) }
115119
116- { /* Preise */ }
117- { event . priceTiers . length > 0 && (
118- < section className = "mb-10" >
119- < h2 className = "mb-4 font-display text-2xl font-bold text-brand-text" > Preise</ h2 >
120- < div className = "grid grid-cols-1 gap-4 sm:grid-cols-2" >
121- { event . priceTiers . map ( ( t ) => (
122- < div key = { t . id } className = "glass-card rounded-section p-5" >
123- < div className = "flex items-baseline justify-between gap-2" >
124- < h3 className = "font-display text-lg font-bold text-brand-text" > { t . name } </ h3 >
125- < span className = "shrink-0 font-semibold text-brand-accent" > { formatPrice ( t . price , t . currency ) } </ span >
126- </ div >
127- { t . description && < p className = "mt-1 text-sm text-brand-text-muted" > { t . description } </ p > }
128- { t . isSoldOut && < span className = "mt-2 inline-block rounded-pill bg-red-100 px-3 py-0.5 text-xs font-semibold text-red-700" > Ausverkauft</ span > }
129- { t . buyUrl && ! t . isSoldOut && (
130- < a href = { t . buyUrl } target = "_blank" rel = "noopener noreferrer nofollow" className = "btn-secondary mt-3 inline-block px-4 py-1.5 text-sm" >
131- Ticket kaufen
132- </ a >
133- ) }
134- </ div >
135- ) ) }
136- </ div >
137- </ section >
138- ) }
139-
140120 { /* Ticket-CTA */ }
141121 { event . ticketUrl && (
142122 < section className = "text-center" >
@@ -146,5 +126,11 @@ export default async function EventDetailPage({ params }: Props) {
146126 </ section >
147127 ) }
148128 </ div >
129+
130+ { /* Tickets & Spenden – identisch zur Startseite (ersetzt die Preisliste) */ }
131+ < div className = "nh" >
132+ < NoirDonateSection content = { donateContent } />
133+ </ div >
134+ </ >
149135 )
150136}
0 commit comments