From cddd9c1ea8d1b0f8a8c89bc27b3bc802aecaeabc Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Wed, 21 May 2025 13:40:01 +0200 Subject: [PATCH] chore: update ancillary imageurl typing to reflect that the image url may be undefined --- apps/scandic-web/server/routers/hotels/output.ts | 2 +- apps/scandic-web/types/components/ancillaryCard.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/scandic-web/server/routers/hotels/output.ts b/apps/scandic-web/server/routers/hotels/output.ts index 6c4d74265..893f5a56e 100644 --- a/apps/scandic-web/server/routers/hotels/output.ts +++ b/apps/scandic-web/server/routers/hotels/output.ts @@ -523,7 +523,7 @@ export const ancillaryPackagesSchema = z id: item.id, title: item.title, description: item.descriptions.html, - imageUrl: item.images[0]?.imageSizes.small, + imageUrl: item.images[0]?.imageSizes.small || undefined, price: { total: item.variants.ancillary.price.totalPrice, currency: item.variants.ancillary.price.currency, diff --git a/apps/scandic-web/types/components/ancillaryCard.ts b/apps/scandic-web/types/components/ancillaryCard.ts index 3b326443b..b1b9b3177 100644 --- a/apps/scandic-web/types/components/ancillaryCard.ts +++ b/apps/scandic-web/types/components/ancillaryCard.ts @@ -1,7 +1,7 @@ export interface AncillaryCardProps { ancillary: { title: string - imageUrl: string + imageUrl?: string imageOpacity?: number price: { total: number