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:
Bianca Widstam
2025-04-01 09:05:42 +00:00
parent 221f842552
commit e6c9e25222
10 changed files with 22 additions and 11 deletions

View File

@@ -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 ||