From 965c09078205966c5213ce21f80aa94719e9513d Mon Sep 17 00:00:00 2001 From: Jeffrey Hales Date: Thu, 11 Jun 2026 14:26:02 -0700 Subject: [PATCH] fix(homepage): move section rendering into the Astro template - keep homepage section data driven from structured frontmatter - render typed section components inside the template map instead of frontmatter helper code - resolve the Astro parse error in HomePage.astro - preserve the existing homepage section order and component split --- www/src/components/HomePage.astro | 54 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/www/src/components/HomePage.astro b/www/src/components/HomePage.astro index 685f7ff..dc21479 100644 --- a/www/src/components/HomePage.astro +++ b/www/src/components/HomePage.astro @@ -38,34 +38,32 @@ function fromHomeContent(home: HomePageContent): HomeSection[] { const sections: HomeSection[] = entry.data.home ? fromHomeContent(entry.data.home) : ((entry.data.sections ?? []) as HomeSection[]); - -function renderSection(section: HomeSection) { - switch (section.type) { - case 'hero': - return ; - case 'services-intro': - return ; - case 'benefits': - return ; - case 'skills': - return ; - case 'insurance': - return ; - case 'esa': - return ; - case 'financial-help': - return ; - case 'process': - return ; - case 'director': - return ; - case 'testimonials': - return ; - } - - return null; -} --- - {sections.map(renderSection)} + {sections.map((section) => { + switch (section.type) { + case 'hero': + return ; + case 'services-intro': + return ; + case 'benefits': + return ; + case 'skills': + return ; + case 'insurance': + return ; + case 'esa': + return ; + case 'financial-help': + return ; + case 'process': + return ; + case 'director': + return ; + case 'testimonials': + return ; + default: + return null; + } + })}