diff --git a/apps/scandic-web/components/ContentType/StaticPages/index.tsx b/apps/scandic-web/components/ContentType/StaticPages/index.tsx index bd1582273..e711aa167 100644 --- a/apps/scandic-web/components/ContentType/StaticPages/index.tsx +++ b/apps/scandic-web/components/ContentType/StaticPages/index.tsx @@ -53,7 +53,9 @@ export default async function StaticPage({ {header.navigation_links ? ( ) : null} - {"dynamic_content" in header && header.dynamic_content ? ( + {"dynamic_content" in header && + header.dynamic_content !== null && + header.dynamic_content !== undefined ? ( ) : null} diff --git a/apps/scandic-web/server/routers/contentstack/contentPage/output.ts b/apps/scandic-web/server/routers/contentstack/contentPage/output.ts index 17eb6ebd6..8ccf460f6 100644 --- a/apps/scandic-web/server/routers/contentstack/contentPage/output.ts +++ b/apps/scandic-web/server/routers/contentstack/contentPage/output.ts @@ -214,7 +214,7 @@ export const contentPageSchema = z.object({ preamble: z.string(), top_primary_button: topPrimaryButtonSchema, navigation_links: navigationLinksSchema, - dynamic_content: headerDynamicContentSchema.optional(), + dynamic_content: headerDynamicContentSchema.nullish(), }), meeting_package: z .object({ @@ -330,7 +330,7 @@ const contentPageSidebarRefsItem = z.discriminatedUnion("__typename", [ const contentPageHeaderRefs = z.object({ navigation_links: z.array(linkConnectionRefs), top_primary_button: linkConnectionRefs.nullable(), - dynamic_content: headerDynamicContentRefsSchema.optional(), + dynamic_content: headerDynamicContentRefsSchema.nullish(), }) export const contentPageRefsSchema = z.object({