Skip to content

Commit 96a7eff

Browse files
authored
Update sideNav (#1515)
1 parent 64bf865 commit 96a7eff

File tree

1 file changed

+4
-0
lines changed
  • packages/gatsby-theme-aio/src/components/Layout

1 file changed

+4
-0
lines changed

packages/gatsby-theme-aio/src/components/Layout/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ export default ({ children, pageContext, location }) => {
323323
}
324324
}, [setShowSearch]);
325325

326+
useEffect( () => {
327+
setHasSideNav(false);
328+
}, [location]);
329+
326330
useEffect(() => {
327331
window.onpopstate = () => {
328332
const searchParams = new URL(window.location).searchParams;

0 commit comments

Comments
 (0)