Skip to content

Commit

Permalink
fix: resize navigation handler
Browse files Browse the repository at this point in the history
  • Loading branch information
flornkm committed Dec 25, 2023
1 parent 32e802e commit 23c7294
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions interface/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ export default function Navigation() {
requestAnimationFrame(() => {
handleSelector()
})

// On resize, reposition the selector
window.addEventListener("resize", handleSelector)

return () => {
window.removeEventListener("resize", handleSelector)
}
}, [pageContext])

return (
Expand Down

1 comment on commit 23c7294

@vercel
Copy link

@vercel vercel bot commented on 23c7294 Dec 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.