Merged in fix/SW-2138-include-hotel-content-in-destination-city-page (pull request #1733)

fix(SW-2138): include hotel content descriptions in hotel data retrieval

* fix(SW-2138): include hotel content descriptions in hotel data retrieval

* fix(SW-2136 ): simplify hotel description handling

* refactor(SW-2136): replace Body component with Typography for hotel descriptions in HotelListingItem


Approved-by: Christian Andolf
This commit is contained in:
Chuma Mcphoy (We Ahead)
2025-04-04 12:18:06 +00:00
parent 275a2b48a6
commit 02cae62e57
3 changed files with 10 additions and 4 deletions

View File

@@ -699,10 +699,11 @@ export const destinationPagesHotelDataSchema = z
.optional(),
}),
})
.transform(({ data: { ...data } }) => {
.transform(({ data: { hotelContent, ...data } }) => {
return {
hotel: {
...data,
hotelDescription: hotelContent?.texts.descriptions?.short,
},
url: data.url ?? "",
}

View File

@@ -563,9 +563,10 @@ export async function getHotelsByHotelIds({
type: hotel.type,
address: hotel.address,
cityIdentifier: cities?.[0]?.cityIdentifier,
hotelDescription: hotel.hotelContent?.texts.descriptions?.short,
},
url: hotelPage?.url ?? "",
} satisfies DestinationPagesHotelData
}
return { ...data, url: hotelPage?.url ?? null }
})