Merged in feat/SW-1356-reward-night-booking-2- (pull request #1559)
feat: SW-1356 Reward night bookingflow * feat: SW-1356 Reward night bookingflow * feat: SW-1356 Removed extra param booking call * feat: SW-1356 Optimized as review comments * feat: SW-1356 Schema validation updates * feat: SW-1356 Fix after rebase * feat: SW-1356 Optimised price.redemptions check * feat: SW-1356 Updated Props naming Approved-by: Arvid Norlin
This commit is contained in:
@@ -11,9 +11,10 @@ export function useRoomsAvailability(
|
||||
toDateString: string,
|
||||
lang: Lang,
|
||||
childArray: ChildrenInRoom,
|
||||
bookingCode?: string
|
||||
bookingCode?: string,
|
||||
redemption?: boolean
|
||||
) {
|
||||
return trpc.hotel.availability.roomsCombinedAvailability.useQuery({
|
||||
const params = {
|
||||
adultsCount,
|
||||
bookingCode,
|
||||
childArray,
|
||||
@@ -21,7 +22,17 @@ export function useRoomsAvailability(
|
||||
lang,
|
||||
roomStayEndDate: toDateString,
|
||||
roomStayStartDate: fromDateString,
|
||||
})
|
||||
redemption,
|
||||
}
|
||||
|
||||
const roomsAvailability = redemption
|
||||
? trpc.hotel.availability.roomsCombinedAvailabilityWithRedemption.useQuery(
|
||||
params
|
||||
)
|
||||
: trpc.hotel.availability.roomsCombinedAvailability.useQuery(params)
|
||||
|
||||
|
||||
return roomsAvailability
|
||||
}
|
||||
|
||||
export function useHotelPackages(
|
||||
|
||||
Reference in New Issue
Block a user