Skip to content

Commit

Permalink
fix(topbar): mobile animation on scroll was too slow
Browse files Browse the repository at this point in the history
  • Loading branch information
plebeius-eth committed Oct 14, 2024
1 parent 3061a92 commit 8e245a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# plebbit temp files
.plebbit
bin
.env
.deploy-env

# Logs
logs
Expand Down
2 changes: 1 addition & 1 deletion src/components/topbar/topbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const TopBarMobile = ({ subplebbitAddress }: { subplebbitAddress: string }) => {

setVisible(prevScrollPos > currentScrollPos || currentScrollPos < 10);
prevScrollPosRef.current = currentScrollPos;
}, 50);
}, 25);

window.addEventListener('scroll', debouncedHandleScroll);

Expand Down
1 change: 0 additions & 1 deletion src/globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
declare global {
interface Window {
STICKY_MENU_SCROLL_LISTENER: boolean;
isElectron: boolean;
}
}
Expand Down

0 comments on commit 8e245a4

Please sign in to comment.