diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts index cd0be320c..d54df6248 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils.ts @@ -11,10 +11,8 @@ import type { HotelData, NullableHotelData, } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps" -import type { - CategorizedFilters, - Filter, -} from "@/types/components/hotelReservation/selectHotel/hotelFilters" +import type { CategorizedFilters } from "@/types/components/hotelReservation/selectHotel/hotelFilters" +import type { DetailedFacility } from "@/types/hotel" import type { HotelsAvailabilityItem } from "@/types/trpc/routers/hotel/availability" const hotelSurroundingsFilterNames = [ @@ -111,9 +109,9 @@ export function getFiltersFromHotels(hotels: HotelData[]): CategorizedFilters { }) const uniqueFilterIds = [...new Set(filters.map((filter) => filter.id))] - const filterList: Filter[] = uniqueFilterIds + const filterList: DetailedFacility[] = uniqueFilterIds .map((filterId) => filters.find((filter) => filter.id === filterId)) - .filter((filter): filter is Filter => filter !== undefined) + .filter((filter): filter is DetailedFacility => filter !== undefined) .sort((a, b) => b.sortOrder - a.sortOrder) return filterList.reduce( diff --git a/components/Blocks/HotelListing/HotelListingItem/utils.ts b/components/Blocks/HotelListing/HotelListingItem/utils.ts index 750ed39fc..9b07381a2 100644 --- a/components/Blocks/HotelListing/HotelListingItem/utils.ts +++ b/components/Blocks/HotelListing/HotelListingItem/utils.ts @@ -8,7 +8,7 @@ export function getTypeSpecificInformation( const { images } = hotel.hotelContent const { descriptions, meetingDescription } = hotel.hotelContent.texts const hotelData = { - description: descriptions.short, + description: descriptions?.short, imageSrc: images.imageSizes.small, altText: images.metaData.altText, } diff --git a/components/ContentType/DestinationPage/HotelListing/HotelListingItem/index.tsx b/components/ContentType/DestinationPage/HotelListing/HotelListingItem/index.tsx index c7fcf609a..cb3a22173 100644 --- a/components/ContentType/DestinationPage/HotelListing/HotelListingItem/index.tsx +++ b/components/ContentType/DestinationPage/HotelListing/HotelListingItem/index.tsx @@ -64,7 +64,7 @@ export default function HotelListingItem({ - {hotel.hotelContent.texts.descriptions.short} + {hotel.hotelContent.texts.descriptions?.short}