From 53c1588e4ca07c464b855c284817b694acaa713e Mon Sep 17 00:00:00 2001 From: Fredrik Thorsson Date: Mon, 9 Dec 2024 11:38:32 +0100 Subject: [PATCH] feat(SW-1012): remove accidentally added files --- .../bookingConfirmation/room.ts | 11 --------- utils/getBookedHotelRoom.ts | 23 ------------------- 2 files changed, 34 deletions(-) delete mode 100644 types/components/hotelReservation/bookingConfirmation/room.ts delete mode 100644 utils/getBookedHotelRoom.ts diff --git a/types/components/hotelReservation/bookingConfirmation/room.ts b/types/components/hotelReservation/bookingConfirmation/room.ts deleted file mode 100644 index 509ac5c64..000000000 --- a/types/components/hotelReservation/bookingConfirmation/room.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { RouterOutput } from "@/lib/trpc/client" - -export interface RoomProps { - booking: RouterOutput["booking"]["confirmation"]["booking"] - img: NonNullable< - RouterOutput["booking"]["confirmation"]["hotel"]["included"] - >["rooms"][number]["images"][number] - roomName: NonNullable< - RouterOutput["booking"]["confirmation"]["hotel"]["included"] - >["rooms"][number]["name"] -} diff --git a/utils/getBookedHotelRoom.ts b/utils/getBookedHotelRoom.ts deleted file mode 100644 index 271bf33b3..000000000 --- a/utils/getBookedHotelRoom.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { RouterOutput } from "@/lib/trpc/client" - -export function getBookedHotelRoom( - hotel: RouterOutput["booking"]["confirmation"]["hotel"], - roomTypeCode: string -) { - const room = hotel.included?.rooms?.find((include) => { - return include.roomTypes.find((roomType) => roomType.code === roomTypeCode) - }) - if (!room) { - return null - } - const bedType = room.roomTypes.find( - (roomType) => roomType.code === roomTypeCode - ) - if (!bedType) { - return null - } - return { - ...room, - bedType, - } -}