From 48b0d1873c5f07da074e5f139598105d12be045b Mon Sep 17 00:00:00 2001 From: JITUDISHA Date: Sun, 17 Aug 2025 11:58:37 +0530 Subject: [PATCH] fix the navbar --- src/components/Navbar.jsx | 157 +++++++++++++++++++++----------------- 1 file changed, 86 insertions(+), 71 deletions(-) diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index 74396dd..a784b3e 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -17,6 +17,18 @@ export default function Navbar() { return () => window.removeEventListener("scroll", handleScroll); }, []); + // Handle body overflow when mobile menu is open + useEffect(() => { + if (mobileMenuOpen) { + document.body.style.overflow = "hidden"; + } else { + document.body.style.overflow = "auto"; + } + return () => { + document.body.style.overflow = "auto"; + }; + }, [mobileMenuOpen]); + const handleJoinUsClick = () => { navigate("/applications"); }; @@ -30,11 +42,11 @@ export default function Navbar() { return (
-
+
-
+
-
- -
- +
- + + + -
- + - +
+ + + +