From fd92afc015fc15ccbc68e2699fcdea6f75753439 Mon Sep 17 00:00:00 2001 From: Hrishikesh Vaipurkar Date: Fri, 7 Nov 2025 10:30:45 +0000 Subject: [PATCH] Merged in fix/SW-3553-logged-in-details- (pull request #3073) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(SW-3553): Fixed screen scolled & locked on click of menu Approved-by: Joakim Jäderberg --- .../components/EnterDetails/Payment/BookingAlert/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/booking-flow/lib/components/EnterDetails/Payment/BookingAlert/index.tsx b/packages/booking-flow/lib/components/EnterDetails/Payment/BookingAlert/index.tsx index 4a39d1532..a1471109b 100644 --- a/packages/booking-flow/lib/components/EnterDetails/Payment/BookingAlert/index.tsx +++ b/packages/booking-flow/lib/components/EnterDetails/Payment/BookingAlert/index.tsx @@ -117,7 +117,7 @@ export default function BookingAlert({ isVisible = false }: BookingAlertProps) { errorCode === BookingErrorCodeEnum.NoAvailabilityForRateAndRoomType const ref = useRef(null) - const { getTopOffset } = useStickyPosition() + const topOffset = useStickyPosition().getTopOffset() useEffect(() => { if (isVisible) { @@ -131,11 +131,11 @@ export default function BookingAlert({ isVisible = false }: BookingAlertProps) { if (showAlert && el) { document.documentElement.style.overflow = "" window.scrollTo({ - top: el.offsetTop - getTopOffset(), + top: el.offsetTop - topOffset, behavior: "smooth", }) } - }, [showAlert, getTopOffset]) + }, [showAlert, topOffset]) useEffect(() => { if (showAlert && isAvailabilityError) {