Skip to content

Commit

Permalink
Allow scroll when NavbarMenu is open due to fixed navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin-Kwan committed Feb 7, 2024
1 parent 26f36d9 commit 65e1503
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/NavbarMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ type MenuProps = {
};

function NavbarMenu({ isMenuOpen, toggleMenu }: MenuProps) {
useEffect(() => {
// If the menu is being opened, prevent scrolling. Otherwise, allow it.
document.body.style.overflow = isMenuOpen ? 'hidden' : 'auto';
}, [isMenuOpen]);
// useEffect(() => {
// // If the menu is being opened, prevent scrolling. Otherwise, allow it.
// document.body.style.overflow = isMenuOpen ? 'hidden' : 'auto';
// }, [isMenuOpen]);
return (
<motion.div
style={{ zIndex: 5, backgroundColor: '#171F29', paddingTop: '64px' }}
Expand Down

0 comments on commit 65e1503

Please sign in to comment.