strapi-starter-next-corporate icon indicating copy to clipboard operation
strapi-starter-next-corporate copied to clipboard

The mobile Menu Doesn't close

Open SudoStain opened this issue 3 years ago • 2 comments

I'm pretty sure this is a nextjs problem but when you click on the contact page the page loads in the background but the menu doesn't close. Screen Shot 2021-09-01 at 1 56 50 PM

SudoStain avatar Sep 03 '21 10:09 SudoStain

@SudoStain Updating components/elements/mobile-nav-menu.js as below may close your issue. https://github.com/strapi/strapi-starter-next-corporate/pull/63/files

catnose99 avatar Sep 06 '21 05:09 catnose99

const closeHandler = () => { closeSelf(); };

useEffect(() => { const routeChangeComplete = (url) => { closeHandler() } router.events.on("routeChangeComplete", routeChangeComplete) return () => { router.events.off("routeChangeComplete", routeChangeComplete) } }, [])

troias avatar Dec 16 '21 10:12 troias