refactor(SW-194): update naming

This commit is contained in:
Matilda Landström
2024-10-09 17:17:27 +02:00
parent e234225c4b
commit acf1dc3a67
4 changed files with 18 additions and 17 deletions

View File

@@ -6,7 +6,7 @@ import {
activitiesCardRefSchema,
activitiesCardSchema,
} from "../schemas/blocks/activitiesCard"
import { accordionRefsSchema,accordionSchema } from "../schemas/blocks/faq"
import { hotelFaqRefsSchema, hotelFaqSchema } from "../schemas/blocks/hotelFaq"
import { systemSchema } from "../schemas/system"
import { HotelPageEnum } from "@/types/enums/hotelPage"
@@ -24,7 +24,7 @@ export const contentBlock = z.discriminatedUnion("__typename", [
export const hotelPageSchema = z.object({
hotel_page: z.object({
content: discriminatedUnionArray(contentBlock.options).nullable(),
faq: accordionSchema,
faq: hotelFaqSchema,
hotel_page_id: z.string(),
title: z.string(),
url: z.string(),
@@ -51,7 +51,7 @@ const hotelPageBlockRefsItem = z.discriminatedUnion("__typename", [
export const hotelPageRefsSchema = z.object({
hotel_page: z.object({
content: discriminatedUnionArray(hotelPageBlockRefsItem.options).nullable(),
faq: accordionRefsSchema.nullable(),
faq: hotelFaqRefsSchema.nullable(),
system: systemSchema,
}),
})