fix(BOOK-661): Updated themes and correct variables for campaign hero

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2026-01-26 06:44:43 +00:00
parent 23460f8960
commit c918c1aa66
5 changed files with 28 additions and 32 deletions

View File

@@ -58,7 +58,18 @@ export const blocksSchema = z.discriminatedUnion("__typename", [
export const heroSchema = z.object({
image: transformedImageVaultAssetSchema,
heading: z.string(),
theme: z.enum(["Peach", "Burgundy"]).default("Peach"),
theme: z
.enum(["Peach", "Burgundy"])
.nullish()
.transform((theme) => {
switch (theme) {
case "Burgundy":
return "Primary 3"
case "Peach":
default:
return "Accent"
}
}),
benefits: z
.array(z.string())
.nullish()