--- import SubpageLayout from '../layouts/SubpageLayout.astro'; import type { SupportedLocale } from '../data/home/navigation'; import { getDoveSiamo } from '../data/dove-siamo'; const path = Astro.url.pathname; const localeMatch = path.match(/^\/(en|th)(\/|$)/); const currentLocale = (localeMatch?.[1] ?? 'it') as SupportedLocale; const doveSiamo = getDoveSiamo(currentLocale); const { page, sections } = doveSiamo; --- { sections.map((s) => ( <>

{s.title}

{s.paragraphs.map((p) => s.locationLine ? (

{p.split(' — ')[0]} {' — '} {p.split(' — ')[1]}

) : (

{p}

), )} )) }