Skip to content

Commit

Permalink
Feature: Close mobile menu when navigating to another page (#1579)
Browse files Browse the repository at this point in the history
  • Loading branch information
JacoKoster committed Jul 18, 2023
1 parent 423077a commit e48c5f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/server-admin-ui/src/components/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class Header extends Component {
document.body.classList.toggle('sidebar-hidden', true)
document.body.classList.toggle('sidebar-mobile-show', false)
})

window.addEventListener('popstate', () => {
document.body.classList.toggle('sidebar-mobile-show', false)
})
}

toggleDropdown() {
Expand Down

0 comments on commit e48c5f8

Please sign in to comment.