Merged in fix/my-stay-ancillaries (pull request #1663)
fix: small design fix, fix bug that redirects to planet, add translations * fix: small design fix, fix bug that redirects to planet, add translations * fix: if user does not have enough points, default quantitywithcard to 1 * fix: fix pr comment Approved-by: Linus Flood Approved-by: Matilda Landström
This commit is contained in:
@@ -64,12 +64,19 @@ export function useGuaranteeBooking({
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
if (bookingStatus?.data?.paymentUrl) {
|
||||
if (bookingStatus?.data?.paymentUrl && isPollingForBookingStatus) {
|
||||
router.push(bookingStatus.data.paymentUrl)
|
||||
setIsPollingForBookingStatus(false)
|
||||
} else if (bookingStatus.isTimeout) {
|
||||
handlePaymentError()
|
||||
}
|
||||
}, [bookingStatus, router, handlePaymentError])
|
||||
}, [
|
||||
bookingStatus,
|
||||
router,
|
||||
handlePaymentError,
|
||||
setIsPollingForBookingStatus,
|
||||
isPollingForBookingStatus,
|
||||
])
|
||||
|
||||
const isLoading =
|
||||
guaranteeBooking.isPending ||
|
||||
|
||||
Reference in New Issue
Block a user