Feat/BOOK-240 hero video
Approved-by: Chuma Mcphoy (We Ahead) Approved-by: Christel Westerberg
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
} from "../schemas/linkConnection"
|
||||
import { internalOrExternalLinkSchema } from "../schemas/pageLinks"
|
||||
import { systemSchema } from "../schemas/system"
|
||||
import { transformedVideoSchema, videoRefSchema } from "../schemas/video"
|
||||
|
||||
// Block schemas
|
||||
export const collectionPageCards = z
|
||||
@@ -78,6 +79,7 @@ const navigationLinksSchema = z
|
||||
export const collectionPageSchema = z.object({
|
||||
collection_page: z.object({
|
||||
hero_image: transformedImageVaultAssetSchema,
|
||||
hero_video: transformedVideoSchema,
|
||||
blocks: discriminatedUnionArray(blocksSchema.options).nullable(),
|
||||
title: z.string(),
|
||||
header: z.object({
|
||||
@@ -145,6 +147,7 @@ const collectionPageHeaderRefs = z.object({
|
||||
|
||||
export const collectionPageRefsSchema = z.object({
|
||||
collection_page: z.object({
|
||||
hero_video: videoRefSchema.nullish(),
|
||||
header: collectionPageHeaderRefs,
|
||||
blocks: discriminatedUnionArray(
|
||||
collectionPageBlockRefsItem.options
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
import {
|
||||
generateRefsResponseTag,
|
||||
generateTag,
|
||||
generateTagsFromAssetSystem,
|
||||
generateTagsFromSystem,
|
||||
} from "../../../utils/generateTag"
|
||||
import { collectionPageRefsSchema } from "./output"
|
||||
@@ -84,6 +85,7 @@ export function generatePageTags(
|
||||
const connections = getConnections(validatedData)
|
||||
return [
|
||||
generateTagsFromSystem(lang, connections),
|
||||
generateTagsFromAssetSystem(connections),
|
||||
generateTag(lang, validatedData.collection_page.system.uid),
|
||||
].flat()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user