fix: explicit type casting for JSON parsed posts to fix build

This commit is contained in:
Carlos (Almeira) 2026-07-17 18:27:33 -05:00
parent acea6b149f
commit 6ed5cb69e6
3 changed files with 3 additions and 3 deletions

View File

@ -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: "" } };

View File

@ -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: "" } };

View File

@ -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 };