From 1b64b79129447e408c4246f53eea1d11216afb2d Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Fri, 5 Jun 2026 10:13:13 +0100 Subject: [PATCH] feat(home): birthday section, map embed, and CMS-driven news title/subtitle - Add BirthdayPricing section to home page (was missing entirely) - Add MapSection component rendering Google Maps iframe from CMS embedUrl - News component now accepts title/subtitle props from CMS sectionTitles Co-Authored-By: Claude Sonnet 4.6 --- src/app/(frontend)/page.tsx | 18 +++++++++++-- src/components/sections/MapSection.tsx | 35 ++++++++++++++++++++++++++ src/components/sections/News.tsx | 13 +++++++--- src/types/globals.ts | 9 +++++++ 4 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 src/components/sections/MapSection.tsx diff --git a/src/app/(frontend)/page.tsx b/src/app/(frontend)/page.tsx index 3aefd57..9f5ba5c 100644 --- a/src/app/(frontend)/page.tsx +++ b/src/app/(frontend)/page.tsx @@ -2,10 +2,12 @@ import { Hero } from '@/components/sections/Hero' import { Locations } from '@/components/sections/Locations' import { WhyParents } from '@/components/sections/WhyParents' import { VideoSection } from '@/components/sections/VideoSection' +import { BirthdayPricing } from '@/components/sections/BirthdayPricing' import { Gallery } from '@/components/sections/Gallery' import { Reviews } from '@/components/sections/Reviews' import { News } from '@/components/sections/News' import { FAQ } from '@/components/sections/FAQ' +import { MapSection } from '@/components/sections/MapSection' import { getHomeData } from '@/lib/getHomeData' import { RefreshRouteOnSave } from '@/components/cms/RefreshRouteOnSave' import { JsonLd } from '@/components/seo/JsonLd' @@ -22,7 +24,7 @@ const STATIC_HERO: NonNullable = { } export default async function HomePage() { - const { home, locations, reviews } = await getHomeData() + const { home, locations, reviews, birthdayPackages } = await getHomeData() const heroData = home?.hero const hero = heroData?.title ? heroData : STATIC_HERO @@ -38,13 +40,25 @@ export default async function HomePage() { title={home?.sectionTitles?.whyParents ?? undefined} /> + 0 ? birthdayPackages : undefined} + title={home?.sectionTitles?.birthday ?? undefined} + intro={home?.birthdayIntro?.text ?? undefined} + /> - + + ) diff --git a/src/components/sections/MapSection.tsx b/src/components/sections/MapSection.tsx new file mode 100644 index 0000000..fa0ea36 --- /dev/null +++ b/src/components/sections/MapSection.tsx @@ -0,0 +1,35 @@ +interface MapSectionProps { + embedUrl?: string | null + address?: string | null +} + +export function MapSection({ embedUrl, address }: MapSectionProps) { + if (!embedUrl) return null + + return ( +
+
+ {address && ( +

+ {address} +

+ )} +
+