We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 718a39d commit 4b39025Copy full SHA for 4b39025
frontend/components/core/NavBarMobile.tsx
@@ -1,4 +1,4 @@
1
-import React, { useState } from 'react'
+import React, { useEffect, useState } from 'react'
2
import { routes, RouteType } from '../../routes/routes'
3
import styled from 'styled-components'
4
import { useTranslation } from 'react-i18next'
@@ -192,6 +192,10 @@ const NavBarMobile = (props: NavProps) => {
192
router.push(router.asPath, undefined, { locale: lang })
193
}
194
195
+ useEffect(() => {
196
+ setIsMenuOpen(false)
197
+ }, [router.pathname])
198
+
199
return (
200
<Container isTransparent={isHome}>
201
<HomeLink href="/">
0 commit comments