fix: ensure complete serialization of posts arrays before returning to server components
This commit is contained in:
parent
40bbe60b01
commit
acea6b149f
@ -67,7 +67,7 @@ async function fetchClasificadosData() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { posts, cardSettings };
|
return { posts: JSON.parse(JSON.stringify(posts)), cardSettings };
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Clasificados fetch error", e);
|
console.error("Clasificados fetch error", e);
|
||||||
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" } };
|
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" } };
|
||||||
|
|||||||
@ -67,7 +67,7 @@ async function fetchEventosData() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { posts, cardSettings };
|
return { posts: JSON.parse(JSON.stringify(posts)), cardSettings };
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Eventos fetch error", e);
|
console.error("Eventos fetch error", e);
|
||||||
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" } };
|
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" } };
|
||||||
|
|||||||
@ -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) {
|
} catch (e) {
|
||||||
console.error("Home fetch error", e);
|
console.error("Home fetch error", e);
|
||||||
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" }, totalPages: 1 };
|
return { posts: [], cardSettings: { showCategory: false, showFooterDate: true, showFooterButton: true, footerText: "" }, totalPages: 1 };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user