Skip to content

Commit

Permalink
Hide side navi on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
hakuzumon committed Jul 4, 2024
1 parent ebf49f1 commit 4165f61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function Nav() {
if (Math.abs(currentPos - previous) > scrollThreshold) {
setScrollPosition(currentPos);
setScrollDirection(scrollPosition() - previous);
setShowSideNavi(false);
}

setShowTopNaviLinks(currentPos < showTopNaviLinksScrollAmount || scrollDirection() < 0);
Expand Down

0 comments on commit 4165f61

Please sign in to comment.