From 22800e55d79a248c7745328073a46d9400d69f23 Mon Sep 17 00:00:00 2001 From: Yashwanth1906 Date: Sun, 15 Jun 2025 09:01:46 +0000 Subject: [PATCH] [fix] : Adjusted the Menu DropDown the Navigation Top Bar --- components/Layout.tsx | 74 +++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/components/Layout.tsx b/components/Layout.tsx index aa895a1af..5245b7f47 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -35,6 +35,17 @@ export default function Layout({ const mobileNavRef = useRef(null); + useEffect(() => { + if (showMobileNav) { + document.body.style.overflow = 'hidden'; + } else { + document.body.style.overflow = 'unset'; + } + return () => { + document.body.style.overflow = 'unset'; + }; + }, [showMobileNav]); + React.useEffect( () => useStore.setState({ overlayNavigation: null }), [router.asPath], @@ -103,7 +114,13 @@ export default function Layout({ -
+
{showMobileNav && } {children}
@@ -293,29 +310,40 @@ const MobileNav = () => { const section = useContext(SectionContext); return ( -
- - +
+
+ + - - - + + + +
); };