From 01e3815820ad8776180e2609202d56d5fb9a1dcf Mon Sep 17 00:00:00 2001 From: Javaxman Date: Mon, 27 Apr 2026 09:49:40 +0200 Subject: [PATCH] Corregge il rendering della home localizzata spostando l'inizializzazione del carosello dopo stackSection. Evita l'errore runtime su /en e /th che causava pagina vuota o UI rotta nel selettore lingua. Made-with: Cursor --- src/pages/index.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 31603cc..2aabe3a 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -17,7 +17,6 @@ import { getCta, } from '../data/home'; -const infrastructureCarouselItems = stackSection.infrastructureCarousel.items; const path = Astro.url.pathname; const localeMatch = path.match(/^\/(en|th)(\/|$)/); const currentLocale = (localeMatch?.[1] ?? 'it') as 'it' | 'en' | 'th'; @@ -28,6 +27,7 @@ const services = getServices(currentLocale); const stackSection = getStackSection(currentLocale); const faq = getFaq(currentLocale); const cta = getCta(currentLocale); +const infrastructureCarouselItems = stackSection.infrastructureCarousel.items; const pageLabels = { it: { focus: 'Focus' }, en: { focus: 'Focus' },