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()
|
} = useSelectRateContext()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (availabilityData) {
|
if (!availabilityData) return
|
||||||
const lowestRoomPrice = getLowestRoomPrice()
|
|
||||||
const booking = inputData?.booking!
|
|
||||||
|
|
||||||
trackLowestRoomPrice({
|
const lowestRoomPrice = getLowestRoomPrice()
|
||||||
hotelId: booking.hotelId,
|
const booking = inputData?.booking
|
||||||
arrivalDate: booking?.fromDate,
|
|
||||||
departureDate: booking?.toDate,
|
if (!booking) return
|
||||||
lowestPrice: lowestRoomPrice.price.toString(),
|
|
||||||
currency: lowestRoomPrice.currency,
|
trackLowestRoomPrice({
|
||||||
})
|
hotelId: booking.hotelId,
|
||||||
}
|
arrivalDate: booking?.fromDate,
|
||||||
|
departureDate: booking?.toDate,
|
||||||
|
lowestPrice: lowestRoomPrice.price.toString(),
|
||||||
|
currency: lowestRoomPrice.currency,
|
||||||
|
})
|
||||||
}, [availabilityData, inputData, getLowestRoomPrice])
|
}, [availabilityData, inputData, getLowestRoomPrice])
|
||||||
|
|
||||||
if (isFetching) {
|
if (isFetching) {
|
||||||
|
|||||||
Reference in New Issue
Block a user