Skip to content

Commit 4d7f96c

Browse files
authored
Merge pull request #1788 from kleros/fix/overlay-scroll
fix(web): fix-overlay-scroll-lock
2 parents 6abacc8 + 4776c31 commit 4d7f96c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
useWritePnkIncreaseAllowance,
1717
} from "hooks/contracts/generated";
1818
import { useCourtDetails } from "hooks/queries/useCourtDetails";
19+
import { useLockOverlayScroll } from "hooks/useLockOverlayScroll";
1920
import { usePnkData } from "hooks/usePNKData";
2021
import { formatETH } from "utils/format";
2122
import { isUndefined } from "utils/index";
@@ -55,6 +56,7 @@ const StakeWithdrawButton: React.FC<IActionButton> = ({ amount, parsedAmount, ac
5556
const [isSuccess, setIsSuccess] = useState(false);
5657
const [popupStepsState, setPopupStepsState] = useState<Steps>();
5758
const controllerRef = useRef<AbortController | null>(null);
59+
useLockOverlayScroll(isPopupOpen);
5860

5961
const { data: courtDetails } = useCourtDetails(id);
6062
const { balance, jurorBalance, allowance, refetchAllowance } = usePnkData({ courtId: id });

web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawPopup/index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { _TimelineItem1, CustomTimeline } from "@kleros/ui-components-library";
55

66
import Close from "svgs/icons/close.svg";
77

8-
import { useLockOverlayScroll } from "hooks/useLockOverlayScroll";
98
import { useSortitionModulePhase } from "hooks/useSortitionModule";
109

1110
import { landscapeStyle } from "styles/landscapeStyle";
@@ -112,7 +111,6 @@ interface IStakeWithdrawPopup {
112111
}
113112

114113
const StakeWithdrawPopup: React.FC<IStakeWithdrawPopup> = ({ amount, closePopup, steps, isSuccess, action }) => {
115-
useLockOverlayScroll(true);
116114
const { data: phase } = useSortitionModulePhase();
117115

118116
return (

0 commit comments

Comments
 (0)