Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

The mobile Menu Doesn't close #62

Open
SudoStain opened this issue Sep 3, 2021 · 2 comments · May be fixed by #63
Open

The mobile Menu Doesn't close #62

SudoStain opened this issue Sep 3, 2021 · 2 comments · May be fixed by #63

Comments

@SudoStain
Copy link

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

@catnose99 catnose99 linked a pull request Sep 6, 2021 that will close this issue
@catnose99
Copy link

catnose99 commented Sep 6, 2021

@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

@troias
Copy link

troias commented Dec 16, 2021

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

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants