Merged in fix/nullable-dynamic-content-in-static-page-header (pull request #2058)
fix: update header dynamic_content schema to allow null values * fix: update header dynamic_content schema to allow null values * fix: update to use nullish Approved-by: Erik Tiekstra
This commit is contained in:
@@ -53,7 +53,9 @@ export default async function StaticPage({
|
||||
{header.navigation_links ? (
|
||||
<LinkChips chips={header.navigation_links} />
|
||||
) : null}
|
||||
{"dynamic_content" in header && header.dynamic_content ? (
|
||||
{"dynamic_content" in header &&
|
||||
header.dynamic_content !== null &&
|
||||
header.dynamic_content !== undefined ? (
|
||||
<HeaderDynamicContent {...header.dynamic_content} />
|
||||
) : null}
|
||||
</>
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user