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:
@@ -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 ?? "",
|
||||
}
|
||||
|
||||
@@ -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 }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user