Merged in fix/teaser-card-issue (pull request #2459)
fix(SW-3120): update teaser card validation * fix: update teaser card validation Approved-by: Michael Zetterberg Approved-by: Linus Flood
This commit is contained in:
@@ -39,10 +39,12 @@ export default function TeaserCardSidepeek({
|
|||||||
handleClose={() => setSidePeekIsOpen(false)}
|
handleClose={() => setSidePeekIsOpen(false)}
|
||||||
openInRoot
|
openInRoot
|
||||||
>
|
>
|
||||||
|
{content ? (
|
||||||
<JsonToHtml
|
<JsonToHtml
|
||||||
nodes={content.json.children}
|
nodes={content.json.children}
|
||||||
embeds={content.embedded_itemsConnection.edges}
|
embeds={content.embedded_itemsConnection.edges}
|
||||||
/>
|
/>
|
||||||
|
) : null}
|
||||||
<div className={styles.ctaContainer}>
|
<div className={styles.ctaContainer}>
|
||||||
{primary_button && (
|
{primary_button && (
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ export const teaserCardBlockSchema = z.object({
|
|||||||
sidepeek_content: z
|
sidepeek_content: z
|
||||||
.object({
|
.object({
|
||||||
heading: z.string(),
|
heading: z.string(),
|
||||||
content: z.object({
|
content: z
|
||||||
|
.object({
|
||||||
json: z.any(),
|
json: z.any(),
|
||||||
embedded_itemsConnection: z.object({
|
embedded_itemsConnection: z.object({
|
||||||
edges: z.array(
|
edges: z.array(
|
||||||
@@ -67,7 +68,8 @@ export const teaserCardBlockSchema = z.object({
|
|||||||
})
|
})
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
}),
|
})
|
||||||
|
.nullish(),
|
||||||
has_primary_button: z.boolean().default(false),
|
has_primary_button: z.boolean().default(false),
|
||||||
primary_button: buttonSchema,
|
primary_button: buttonSchema,
|
||||||
has_secondary_button: z.boolean().default(false),
|
has_secondary_button: z.boolean().default(false),
|
||||||
|
|||||||
Reference in New Issue
Block a user