From bd0fc36ea5c9ac2355c42344bf4a422a16497fdb Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Mon, 12 Feb 2024 23:37:06 -0800 Subject: [PATCH] no need to lock scrolling on mobile after jank fix --- src/app/components/MobileMenu.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/app/components/MobileMenu.tsx b/src/app/components/MobileMenu.tsx index da47680..92bec14 100644 --- a/src/app/components/MobileMenu.tsx +++ b/src/app/components/MobileMenu.tsx @@ -23,18 +23,11 @@ export default function MobileMenu() { const setIsOpen = useMobileMenuState((state) => state.setIsOpen) const handleClick = () => { - if (isOpen) { - document.body.style.overflow = 'auto' - setIsOpen(false) - } else { - document.body.style.overflow = 'hidden' - setIsOpen(true) - } + setIsOpen(!isOpen) } const handleSubmit = () => { setIsOpen(false) - document.body.style.overflow = 'auto' } return (