mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(topbar): mobile animation on scroll was too slow
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
# plebbit temp files
|
# plebbit temp files
|
||||||
.plebbit
|
.plebbit
|
||||||
bin
|
bin
|
||||||
|
.env
|
||||||
|
.deploy-env
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
logs
|
logs
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ const TopBarMobile = ({ subplebbitAddress }: { subplebbitAddress: string }) => {
|
|||||||
|
|
||||||
setVisible(prevScrollPos > currentScrollPos || currentScrollPos < 10);
|
setVisible(prevScrollPos > currentScrollPos || currentScrollPos < 10);
|
||||||
prevScrollPosRef.current = currentScrollPos;
|
prevScrollPosRef.current = currentScrollPos;
|
||||||
}, 50);
|
}, 25);
|
||||||
|
|
||||||
window.addEventListener('scroll', debouncedHandleScroll);
|
window.addEventListener('scroll', debouncedHandleScroll);
|
||||||
|
|
||||||
|
|||||||
Vendored
-1
@@ -1,6 +1,5 @@
|
|||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
STICKY_MENU_SCROLL_LISTENER: boolean;
|
|
||||||
isElectron: boolean;
|
isElectron: boolean;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user