diff --git a/src/app/[locale]/heritage/page.tsx b/src/app/[locale]/heritage/page.tsx
index d6781d6..d79bafc 100644
--- a/src/app/[locale]/heritage/page.tsx
+++ b/src/app/[locale]/heritage/page.tsx
@@ -197,8 +197,8 @@ export default async function HeritagePage({ params }: { params: Promise<{ local
const resolvedParams = await params;
const locale = resolvedParams.locale;
- // 🔥 Cargamos el diccionario para los textos fijos
- const t = await getTranslations("HeritagePage");
+ // Pass locale explicitly so getTranslations stays static-friendly under ISR.
+ const t = await getTranslations({ locale, namespace: "HeritagePage" });
let rawSections: any[] = [];
try {
diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx
index 68d268c..207508e 100644
--- a/src/app/[locale]/layout.tsx
+++ b/src/app/[locale]/layout.tsx
@@ -72,7 +72,7 @@ export default async function RootLayout({
}
const [messages, branding, social] = await Promise.all([
- getMessages(),
+ getMessages({ locale }),
getBranding(),
getSocialLinks(),
]);
@@ -114,7 +114,7 @@ export default async function RootLayout({
{children}
-
+
diff --git a/src/app/[locale]/news/page.tsx b/src/app/[locale]/news/page.tsx
index c2c6788..5eda7b6 100644
--- a/src/app/[locale]/news/page.tsx
+++ b/src/app/[locale]/news/page.tsx
@@ -31,8 +31,8 @@ export default async function NewsHub({ params }: { params: Promise<{ locale: st
const resolvedParams = await params;
const locale = resolvedParams.locale;
- // 🔥 LLAMAMOS AL DICCIONARIO
- const t = await getTranslations("NewsHub");
+ // Pass locale explicitly so getTranslations stays static-friendly under ISR.
+ const t = await getTranslations({ locale, namespace: "NewsHub" });
let rawArticles: any[] = [];
try {
diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx
index 8b27c3f..82a8eb4 100644
--- a/src/app/[locale]/page.tsx
+++ b/src/app/[locale]/page.tsx
@@ -176,7 +176,7 @@ export default async function Home({ params }: { params: Promise<{ locale: strin
-
+
diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx
index 02f15bc..2362109 100644
--- a/src/components/layout/Footer.tsx
+++ b/src/components/layout/Footer.tsx
@@ -2,14 +2,16 @@ import { Link } from "@/i18n/routing";
import { Linkedin, Instagram, Youtube, Mail, Phone } from "lucide-react";
import { prisma } from "@/lib/prisma";
import { getLocalizedData } from "@/lib/i18nHelper";
-import { getTranslations, getLocale } from "next-intl/server";
+import { getTranslations } from "next-intl/server";
import { getFooterSettings, getSocialLinks } from "@/lib/siteSettings";
import { AiContactButton, AiFooterLink } from "@/components/ui/AiTriggerButton";
-export default async function Footer() {
- const locale = await getLocale();
- const t = await getTranslations("Footer");
+// `locale` comes from the parent layout. Reading it via getLocale() here
+// would call cookies()/headers() under the hood, breaking ISR with
+// DYNAMIC_SERVER_USAGE — passing it explicitly keeps everything static.
+export default async function Footer({ locale }: { locale: string }) {
+ const t = await getTranslations({ locale, namespace: "Footer" });
const [footer, social] = await Promise.all([
getFooterSettings(locale),
diff --git a/src/components/sections/PatrizioLegacy.tsx b/src/components/sections/PatrizioLegacy.tsx
index c2fc28e..43b4b31 100644
--- a/src/components/sections/PatrizioLegacy.tsx
+++ b/src/components/sections/PatrizioLegacy.tsx
@@ -1,10 +1,12 @@
import { ArrowRight } from "lucide-react";
-import { Link } from "@/i18n/routing";
-// 🔥 IMPORTAMOS LA VERSIÓN DE SERVIDOR
-import { getTranslations } from "next-intl/server";
+import { Link } from "@/i18n/routing";
+import { getTranslations } from "next-intl/server";
-export default async function PatrizioLegacy() {
- const t = await getTranslations("PatrizioLegacy");
+// `locale` is passed in from the parent server component (the page).
+// Calling getTranslations without an explicit locale forces next-intl to
+// read cookies/headers, which trips DYNAMIC_SERVER_USAGE under ISR.
+export default async function PatrizioLegacy({ locale }: { locale: string }) {
+ const t = await getTranslations({ locale, namespace: "PatrizioLegacy" });
return (