From 6049fb4a1dcb74032b395173fa5fbdd6f6ec3097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matilda=20Landstr=C3=B6m?= Date: Tue, 10 Sep 2024 11:27:55 +0200 Subject: [PATCH] fix(SW-303): add card as nullable --- components/ContentType/HotelPage/index.tsx | 2 +- server/routers/contentstack/hotelPage/output.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/ContentType/HotelPage/index.tsx b/components/ContentType/HotelPage/index.tsx index abc3b9713..ca1203381 100644 --- a/components/ContentType/HotelPage/index.tsx +++ b/components/ContentType/HotelPage/index.tsx @@ -32,7 +32,7 @@ export default async function HotelPage() { activitiesCard, } = hotelData - MOCK_FACILITIES.push(setActivityCard(activitiesCard)) + activitiesCard && MOCK_FACILITIES.push(setActivityCard(activitiesCard)) return (
diff --git a/server/routers/contentstack/hotelPage/output.ts b/server/routers/contentstack/hotelPage/output.ts index 1002fc80c..c6fed0fc7 100644 --- a/server/routers/contentstack/hotelPage/output.ts +++ b/server/routers/contentstack/hotelPage/output.ts @@ -40,6 +40,7 @@ export const validateHotelPageSchema = z.object({ upcoming_activities_card: activityCardSchema.optional(), }) ) + .nullable() .optional(), }), })