From 4776c3139ba432dc2540110d204c4487e571cd43 Mon Sep 17 00:00:00 2001 From: Harman-singh-waraich Date: Fri, 13 Dec 2024 10:41:35 +0530 Subject: [PATCH] fix(web): fix-overlay-scroll-lock --- .../Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx | 2 ++ .../Courts/CourtDetails/StakePanel/StakeWithdrawPopup/index.tsx | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx index 7738650bb..d8269fa4f 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx @@ -16,6 +16,7 @@ import { useWritePnkIncreaseAllowance, } from "hooks/contracts/generated"; import { useCourtDetails } from "hooks/queries/useCourtDetails"; +import { useLockOverlayScroll } from "hooks/useLockOverlayScroll"; import { usePnkData } from "hooks/usePNKData"; import { formatETH } from "utils/format"; import { isUndefined } from "utils/index"; @@ -55,6 +56,7 @@ const StakeWithdrawButton: React.FC = ({ amount, parsedAmount, ac const [isSuccess, setIsSuccess] = useState(false); const [popupStepsState, setPopupStepsState] = useState(); const controllerRef = useRef(null); + useLockOverlayScroll(isPopupOpen); const { data: courtDetails } = useCourtDetails(id); const { balance, jurorBalance, allowance, refetchAllowance } = usePnkData({ courtId: id }); diff --git a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawPopup/index.tsx b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawPopup/index.tsx index 5b5f891fe..e226edf30 100644 --- a/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawPopup/index.tsx +++ b/web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawPopup/index.tsx @@ -5,7 +5,6 @@ import { _TimelineItem1, CustomTimeline } from "@kleros/ui-components-library"; import Close from "svgs/icons/close.svg"; -import { useLockOverlayScroll } from "hooks/useLockOverlayScroll"; import { useSortitionModulePhase } from "hooks/useSortitionModule"; import { landscapeStyle } from "styles/landscapeStyle"; @@ -112,7 +111,6 @@ interface IStakeWithdrawPopup { } const StakeWithdrawPopup: React.FC = ({ amount, closePopup, steps, isSuccess, action }) => { - useLockOverlayScroll(true); const { data: phase } = useSortitionModulePhase(); return (