From 6ed5cb69e6d7e16eef5b16483f256ff09b5feefd Mon Sep 17 00:00:00 2001 From: "Carlos (Almeira)" Date: Fri, 17 Jul 2026 18:27:33 -0500 Subject: [PATCH] fix: explicit type casting for JSON parsed posts to fix build --- src/app/clasificados/page.tsx | 2 +- src/app/eventos/page.tsx | 2 +- src/app/page.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/clasificados/page.tsx b/src/app/clasificados/page.tsx index 3d12c4d..3f5bc07 100644 --- a/src/app/clasificados/page.tsx +++ b/src/app/clasificados/page.tsx @@ -67,7 +67,7 @@ async function fetchClasificadosData() { } } - return { posts: JSON.parse(JSON.stringify(posts)), cardSettings }; + return { posts: JSON.parse(JSON.stringify(posts)) as Post[], cardSettings }; } catch (e) { console.error("Clasificados fetch error", e); return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" } }; diff --git a/src/app/eventos/page.tsx b/src/app/eventos/page.tsx index ddb3ade..e547f8c 100644 --- a/src/app/eventos/page.tsx +++ b/src/app/eventos/page.tsx @@ -67,7 +67,7 @@ async function fetchEventosData() { } } - return { posts: JSON.parse(JSON.stringify(posts)), cardSettings }; + return { posts: JSON.parse(JSON.stringify(posts)) as Post[], cardSettings }; } catch (e) { console.error("Eventos fetch error", e); return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" } }; diff --git a/src/app/page.tsx b/src/app/page.tsx index fbadaac..0334c86 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -87,7 +87,7 @@ async function fetchHomeData(page: number = 1, isAdmin: boolean = false, adminMo } } - return { posts: JSON.parse(JSON.stringify(posts)), cardSettings, totalPages }; + return { posts: JSON.parse(JSON.stringify(posts)) as Post[], cardSettings, totalPages }; } catch (e) { console.error("Home fetch error", e); return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" }, totalPages: 1 };