fix: explicit type casting for JSON parsed posts to fix build
This commit is contained in:
parent
acea6b149f
commit
6ed5cb69e6
@ -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: "" } };
|
||||
|
||||
@ -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: "" } };
|
||||
|
||||
@ -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 };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user