fix(birthday): reconnect extra items to CMS + fix altanka placeholder
extraItems was simplified to always use FALLBACK_EXTRA_ITEMS in the previous refactor, breaking CMS editability for Костюмованих ведучих, Аквагрим, Затишну альтанку. Restore CMS-first logic: use cmsPackageItems[3+] when available, fallback otherwise. Replace wrong gallery-shumi-6.webp (DyvoLis topiary arch) with null so the placeholder SVG shows until a real photo is uploaded via CMS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
00c3548272
commit
c3e1edbee7
1 changed files with 5 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ const FALLBACK_EXTRA_ITEMS = [
|
|||
title: 'Затишну альтанку',
|
||||
description:
|
||||
'простір для смачного частування гостей та дорослих розмов, поки діти на повну занурені у квести, розваги та атракціони.',
|
||||
image: '/images/figma/gallery-shumi-6.webp',
|
||||
image: null,
|
||||
},
|
||||
]
|
||||
|
||||
|
|
@ -217,7 +217,10 @@ export default async function BirthdayPage() {
|
|||
cmsHasPhotos && cmsPackageItems.length >= 3
|
||||
? cmsPackageItems.slice(0, 3).map(toCard)
|
||||
: FALLBACK_PACKAGE_ITEMS.map(toCard)
|
||||
const extraItems: PackageCardData[] = FALLBACK_EXTRA_ITEMS.map(toCard)
|
||||
const extraItems: PackageCardData[] =
|
||||
cmsPackageItems.length > 3
|
||||
? cmsPackageItems.slice(3).map(toCard)
|
||||
: FALLBACK_EXTRA_ITEMS.map(toCard)
|
||||
|
||||
const whyTitle = (d?.whyTitle as string) ?? 'Чому варто святкувати у Шуміленді'
|
||||
const whyItems = Array.isArray(d?.whyItems)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue