diff --git a/src/components/sections/Locations.tsx b/src/components/sections/Locations.tsx index 8fb51e1..398d2d0 100644 --- a/src/components/sections/Locations.tsx +++ b/src/components/sections/Locations.tsx @@ -8,6 +8,14 @@ function getMediaUrl(img: Media | string | null | undefined): string | null { return img.url ?? null } +const FALLBACK_IMAGES: Record = { + dynopark: '/images/figma/loc-dinopark.webp', + dyvolis: '/images/figma/loc-divo-lis.webp', + maze: '/images/figma/loc-maze.webp', + tir: '/images/figma/loc-tir.webp', + playground: '/images/figma/loc-playground.webp', +} + const STATIC_LOCATIONS: LocationData[] = [ { name: 'ДиноПарк', @@ -69,7 +77,7 @@ export function Locations({ data, title }: LocationsProps) { slug: loc.slug, tagline: loc.tagline ?? '', description: loc.shortDesc ?? '', - image: getMediaUrl(loc.image) ?? '/images/figma/loc-dinopark.webp', + image: getMediaUrl(loc.image) ?? FALLBACK_IMAGES[loc.slug] ?? '/images/figma/loc-dinopark.webp', href: loc.href ?? `/lokatsii#${loc.slug}`, })) : STATIC_LOCATIONS diff --git a/src/components/sections/Reviews.tsx b/src/components/sections/Reviews.tsx index fdf908b..dc3cb12 100644 --- a/src/components/sections/Reviews.tsx +++ b/src/components/sections/Reviews.tsx @@ -133,7 +133,7 @@ export function Reviews({ data, title }: ReviewsProps) {

{title ?? 'Відгуки'} @@ -203,7 +203,11 @@ export function Reviews({ data, title }: ReviewsProps) { > {review.ago} - +