--- import BaseLayout from '../layouts/BaseLayout.astro'; import PageShell from '../components/PageShell.astro'; import Section from '../components/Section.astro'; import Container from '../components/Container.astro'; import LocalHero from '../components/LocalHero.astro'; import EntityGrid from '../components/EntityGrid.astro'; import ServiceCard from '../components/ServiceCard.astro'; import ContactBlock from '../components/ContactBlock.astro'; import HoursBlock from '../components/HoursBlock.astro'; import brief from '../../examples/brief-local-business.json'; import { validateBrief } from '../renderer/validate-brief'; import { selectSections } from '../renderer/select-sections'; import { mapToComponents } from '../renderer/map-to-components'; validateBrief(brief); const sections = selectSections(brief); const data = mapToComponents(brief, sections); const pageTitle = brief.common.business_name; const pageDescription = brief.common.description; const language = brief.common.language; --- {sections.includes('hero') && data.hero && ( )} {sections.includes('services') && data.services && (
{data.services.items.map((service) => ( ))}
)} {sections.includes('hours') && data.hours && (
)} {sections.includes('contact') && data.contact && (
)}