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>
41 lines
955 B
Plaintext
41 lines
955 B
Plaintext
---
|
|
import SubpageLayout from '../layouts/SubpageLayout.astro';
|
|
import type { SupportedLocale } from '../data/home/navigation';
|
|
import { getAbout } from '../data/about';
|
|
|
|
const path = Astro.url.pathname;
|
|
const localeMatch = path.match(/^\/(en|th)(\/|$)/);
|
|
const currentLocale = (localeMatch?.[1] ?? 'it') as SupportedLocale;
|
|
const about = getAbout(currentLocale);
|
|
const { page, intro, sections } = about;
|
|
---
|
|
|
|
<SubpageLayout
|
|
title={page.title}
|
|
description={page.description}
|
|
heading={page.heading}
|
|
lead={page.lead}
|
|
>
|
|
<p>{intro}</p>
|
|
|
|
{
|
|
sections.map((s) => (
|
|
<>
|
|
<h2>{s.title}</h2>
|
|
{s.paragraphs?.map((p) => (
|
|
<p>{p}</p>
|
|
))}
|
|
{s.bullets && s.bullets.length > 0 ? (
|
|
<ul>
|
|
{s.bullets.map((b) => (
|
|
<li>
|
|
<strong>{b.title}</strong> {b.text}
|
|
</li>
|
|
))}
|
|
</ul>
|
|
) : null}
|
|
</>
|
|
))
|
|
}
|
|
</SubpageLayout>
|