Merged in fix/optional-chaining-lint-issue (pull request #2905)
* remove optional chaining with force unrwap Approved-by: Bianca Widstam
This commit is contained in:
@@ -31,18 +31,20 @@ export function RoomsContainer({}: RoomsContainerProps) {
|
||||
} = useSelectRateContext()
|
||||
|
||||
useEffect(() => {
|
||||
if (availabilityData) {
|
||||
const lowestRoomPrice = getLowestRoomPrice()
|
||||
const booking = inputData?.booking!
|
||||
if (!availabilityData) return
|
||||
|
||||
trackLowestRoomPrice({
|
||||
hotelId: booking.hotelId,
|
||||
arrivalDate: booking?.fromDate,
|
||||
departureDate: booking?.toDate,
|
||||
lowestPrice: lowestRoomPrice.price.toString(),
|
||||
currency: lowestRoomPrice.currency,
|
||||
})
|
||||
}
|
||||
const lowestRoomPrice = getLowestRoomPrice()
|
||||
const booking = inputData?.booking
|
||||
|
||||
if (!booking) return
|
||||
|
||||
trackLowestRoomPrice({
|
||||
hotelId: booking.hotelId,
|
||||
arrivalDate: booking?.fromDate,
|
||||
departureDate: booking?.toDate,
|
||||
lowestPrice: lowestRoomPrice.price.toString(),
|
||||
currency: lowestRoomPrice.currency,
|
||||
})
|
||||
}, [availabilityData, inputData, getLowestRoomPrice])
|
||||
|
||||
if (isFetching) {
|
||||
|
||||
Reference in New Issue
Block a user