fix: clean up hotel and its typings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { getHotelData } from "@/lib/trpc/memoizedRequests"
|
||||
import { getHotel } from "@/lib/trpc/memoizedRequests"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
@@ -73,15 +73,16 @@ async function enhanceHotels(hotels: {
|
||||
const language = getLang()
|
||||
|
||||
const hotelFetchers = hotels.availability.map(async (hotel) => {
|
||||
const hotelData = await getHotelData({
|
||||
const hotelData = await getHotel({
|
||||
hotelId: hotel.hotelId.toString(),
|
||||
isCardOnlyPayment: false,
|
||||
language,
|
||||
})
|
||||
|
||||
if (!hotelData) return { hotelData: null, price: hotel.productType }
|
||||
|
||||
return {
|
||||
hotelData: hotelData.data.attributes,
|
||||
hotelData: hotelData.hotel,
|
||||
price: hotel.productType,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user