feat(SW-2265): Added campaign-page

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-06-10 06:35:43 +00:00
parent ead822fa62
commit ace5519869
25 changed files with 538 additions and 1 deletions

View File

@@ -85,7 +85,21 @@ export const rawMetadataSchema = z.object({
})
.nullish(),
heading: z.string().nullish(),
preamble: z.string().nullish(),
preamble: z
.union([
z.string(),
z.object({
first_column: z.string(),
}),
])
.transform((preamble) => {
if (typeof preamble === "string") {
return preamble
}
return preamble?.first_column || null
})
.nullish(),
header: z
.object({
heading: z.string().nullish(),