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)}
|
||||
openInRoot
|
||||
>
|
||||
{content ? (
|
||||
<JsonToHtml
|
||||
nodes={content.json.children}
|
||||
embeds={content.embedded_itemsConnection.edges}
|
||||
/>
|
||||
) : null}
|
||||
<div className={styles.ctaContainer}>
|
||||
{primary_button && (
|
||||
<ButtonLink
|
||||
|
||||
@@ -38,7 +38,8 @@ export const teaserCardBlockSchema = z.object({
|
||||
sidepeek_content: z
|
||||
.object({
|
||||
heading: z.string(),
|
||||
content: z.object({
|
||||
content: z
|
||||
.object({
|
||||
json: z.any(),
|
||||
embedded_itemsConnection: z.object({
|
||||
edges: z.array(
|
||||
@@ -67,7 +68,8 @@ export const teaserCardBlockSchema = z.object({
|
||||
})
|
||||
),
|
||||
}),
|
||||
}),
|
||||
})
|
||||
.nullish(),
|
||||
has_primary_button: z.boolean().default(false),
|
||||
primary_button: buttonSchema,
|
||||
has_secondary_button: z.boolean().default(false),
|
||||
|
||||
Reference in New Issue
Block a user