Skip to content

Commit

Permalink
close menu on routeChangeComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrembecky committed May 19, 2024
1 parent 441a46c commit d5d9f7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/PageLayout/MenuMain/MenuMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export const MenuMain: FC = () => {
fullWidthMenu && setIsVisible(false)
}

router.events.on('routeChangeStart', handleRouteChange)
router.events.on('routeChangeComplete', handleRouteChange)

return () => {
router.events.off('routeChangeStart', handleRouteChange)
router.events.off('routeChangeComplete', handleRouteChange)
}
}, [router, fullWidthMenu])

Expand Down

0 comments on commit d5d9f7b

Please sign in to comment.