From fe1f4b063db5c17e9854112a2588fade6491ff10 Mon Sep 17 00:00:00 2001 From: Tobias Johansson Date: Thu, 22 May 2025 07:33:13 +0000 Subject: [PATCH] Merged in fix/paymentFail-event-fix (pull request #2189) fix: infinite loop when bookingStatus isTimeout occurs * fix: infinite loop when bookingStatus isTimeout occurs Approved-by: Linus Flood --- .../EnterDetails/Payment/PaymentClient.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx index c0ac15f3d..50acdadd4 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx @@ -275,7 +275,14 @@ export default function PaymentClient({ } else if (bookingStatus.isTimeout) { handlePaymentError("Timeout") } - }, [bookingStatus, router, intl, lang, handlePaymentError]) + }, [ + bookingStatus.data, + bookingStatus.isTimeout, + router, + intl, + lang, + handlePaymentError, + ]) useEffect(() => { setIsSubmittingDisabled(