Skip to content

Commit

Permalink
Update sideNav (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
louisachu authored Jun 14, 2023
1 parent 64bf865 commit 96a7eff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/gatsby-theme-aio/src/components/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ export default ({ children, pageContext, location }) => {
}
}, [setShowSearch]);

useEffect( () => {
setHasSideNav(false);
}, [location]);

useEffect(() => {
window.onpopstate = () => {
const searchParams = new URL(window.location).searchParams;
Expand Down

0 comments on commit 96a7eff

Please sign in to comment.