diff --git a/src/shared/ui-kit/ContextMenu/ContextMenu.tsx b/src/shared/ui-kit/ContextMenu/ContextMenu.tsx index 3b89afa047..8229c399d3 100644 --- a/src/shared/ui-kit/ContextMenu/ContextMenu.tsx +++ b/src/shared/ui-kit/ContextMenu/ContextMenu.tsx @@ -1,6 +1,5 @@ import React, { forwardRef, - useEffect, useImperativeHandle, useRef, useState, @@ -21,7 +20,6 @@ import { FloatingFocusManager, FloatingOverlay, } from "@floating-ui/react"; -import { useLockedBody } from "@/shared/hooks"; import { ContextMenuItem as Item } from "@/shared/interfaces"; import { Loader } from "../Loader"; import { ContextMenuItem } from "./components"; @@ -45,7 +43,6 @@ export const ContextMenu = forwardRef( const [isOpen, setIsOpen] = useState(false); const listItemsRef = useRef<(HTMLElement | null)[]>([]); const listContentRef = useRef(menuItems.map((item) => item.text)); - const { lockBodyScroll, unlockBodyScroll } = useLockedBody(); const handleOpenChange = (open: boolean) => { setIsOpen(open); @@ -118,14 +115,6 @@ export const ContextMenu = forwardRef( [refs], ); - useEffect(() => { - if (isOpen) { - lockBodyScroll(); - } else { - unlockBodyScroll(); - } - }, [isOpen]); - return ( {isOpen && (