Stats e prodotti non usavano il locale, quindi dopo lo switch lingua lo scroll mostrava ancora l'italiano. Co-authored-by: Cursor <cursoragent@cursor.com>
38 lines
931 B
Plaintext
38 lines
931 B
Plaintext
---
|
|
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;
|
|
---
|
|
|
|
<SubpageLayout
|
|
title={page.title}
|
|
description={page.description}
|
|
heading={page.heading}
|
|
lead={page.lead}
|
|
>
|
|
{
|
|
sections.map((s) => (
|
|
<>
|
|
<h2>{s.title}</h2>
|
|
{s.paragraphs.map((p) =>
|
|
s.locationLine ? (
|
|
<p>
|
|
<strong>{p.split(' — ')[0]}</strong>
|
|
{' — '}
|
|
<strong>{p.split(' — ')[1]}</strong>
|
|
</p>
|
|
) : (
|
|
<p>{p}</p>
|
|
),
|
|
)}
|
|
</>
|
|
))
|
|
}
|
|
</SubpageLayout>
|