fix: ensure complete serialization of posts arrays before returning to server components

This commit is contained in:
Carlos (Almeira) 2026-07-17 18:23:42 -05:00
parent 40bbe60b01
commit acea6b149f
3 changed files with 3 additions and 3 deletions

View File

@ -67,7 +67,7 @@ async function fetchClasificadosData() {
}
}
return { posts, cardSettings };
return { posts: JSON.parse(JSON.stringify(posts)), cardSettings };
} catch (e) {
console.error("Clasificados fetch error", e);
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" } };

View File

@ -67,7 +67,7 @@ async function fetchEventosData() {
}
}
return { posts, cardSettings };
return { posts: JSON.parse(JSON.stringify(posts)), cardSettings };
} catch (e) {
console.error("Eventos fetch error", e);
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" } };

View File

@ -87,7 +87,7 @@ async function fetchHomeData(page: number = 1, isAdmin: boolean = false, adminMo
}
}
return { posts, cardSettings, totalPages };
return { posts: JSON.parse(JSON.stringify(posts)), cardSettings, totalPages };
} catch (e) {
console.error("Home fetch error", e);
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" }, totalPages: 1 };