From 802f58ad17b470fe772baddfdaefff17257ffd63 Mon Sep 17 00:00:00 2001 From: CCS Admin Date: Wed, 25 Feb 2026 16:13:43 +0000 Subject: [PATCH] fix: read CTA from cta group field instead of flat ctaLabel/ctaLink The CMS hero-block sends CTA data as a nested group (cta.text, cta.link) but the component was reading flat fields (ctaLabel, ctaLink). Falls back to the old field names for backwards compatibility. Co-Authored-By: Claude Opus 4.6 --- src/components/blocks/HeroBlock.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/blocks/HeroBlock.tsx b/src/components/blocks/HeroBlock.tsx index 849fd42..b924457 100644 --- a/src/components/blocks/HeroBlock.tsx +++ b/src/components/blocks/HeroBlock.tsx @@ -13,8 +13,9 @@ export function HeroBlock({ block }: HeroBlockProps) { const subheadline = (block.subline as string) || (block.subheadline as string) || (block.subtitle as string) || '' const backgroundMedia = block.backgroundImage as Record | undefined const backgroundUrl = backgroundMedia?.url as string | undefined - const ctaLabel = (block.ctaLabel as string) || (block.buttonText as string) || '' - const ctaLink = (block.ctaLink as string) || (block.buttonLink as string) || '' + const cta = block.cta as Record | undefined + const ctaLabel = (cta?.text as string) || (block.ctaLabel as string) || '' + const ctaLink = (cta?.link as string) || (block.ctaLink as string) || '' const overlayStyle = (block.overlayStyle as string) || 'dark' const alignment = (block.alignment as string) || 'center' const fullHeight = block.fullHeight !== false