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,9 +31,12 @@ export function RoomsContainer({}: RoomsContainerProps) {
|
|||||||
} = useSelectRateContext()
|
} = useSelectRateContext()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (availabilityData) {
|
if (!availabilityData) return
|
||||||
|
|
||||||
const lowestRoomPrice = getLowestRoomPrice()
|
const lowestRoomPrice = getLowestRoomPrice()
|
||||||
const booking = inputData?.booking!
|
const booking = inputData?.booking
|
||||||
|
|
||||||
|
if (!booking) return
|
||||||
|
|
||||||
trackLowestRoomPrice({
|
trackLowestRoomPrice({
|
||||||
hotelId: booking.hotelId,
|
hotelId: booking.hotelId,
|
||||||
@@ -42,7 +45,6 @@ export function RoomsContainer({}: RoomsContainerProps) {
|
|||||||
lowestPrice: lowestRoomPrice.price.toString(),
|
lowestPrice: lowestRoomPrice.price.toString(),
|
||||||
currency: lowestRoomPrice.currency,
|
currency: lowestRoomPrice.currency,
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}, [availabilityData, inputData, getLowestRoomPrice])
|
}, [availabilityData, inputData, getLowestRoomPrice])
|
||||||
|
|
||||||
if (isFetching) {
|
if (isFetching) {
|
||||||
|
|||||||
Reference in New Issue
Block a user