fix(cms): add _resolve parameter to getCalendarItems for comprehensive data retrieval
- Updated getCalendarItems function to include the _resolve parameter set to "all", ensuring all related data is fetched. - Refined getHref function in DeadlineBannerBlock.svelte to simplify link handling by directly checking for the url property.
This commit is contained in:
@@ -71,10 +71,7 @@
|
||||
|
||||
function getHref(link: DeadlineBannerBlockData["link"]): string {
|
||||
if (typeof link === "string" && link) return link;
|
||||
if (link && typeof link === "object") {
|
||||
if (link.url) return link.url;
|
||||
if (link._slug) return `/post/${encodeURIComponent(link._slug)}`;
|
||||
}
|
||||
if (link && typeof link === "object" && link.url) return link.url;
|
||||
return "";
|
||||
}
|
||||
const href = $derived(getHref(linkValue));
|
||||
|
||||
Reference in New Issue
Block a user