Fix ScrollTopButton not loading new posts when scrolled to the top

environments/review-scrolltop-o0i3nj/deployments/4179
Alex Gleason 2023-10-14 13:18:30 -05:00
rodzic 0206316acd
commit 2959dc5bae
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -44,10 +44,10 @@ const ScrollTopButton: React.FC<IScrollTopButton> = ({
/** Unload feed items if scrolled to the top. */ /** Unload feed items if scrolled to the top. */
const maybeUnload = useCallback(() => { const maybeUnload = useCallback(() => {
if (autoload && scrolledTop) { if (autoload && scrolledTop && count) {
onClick(); onClick();
} }
}, [autoload, scrolledTop, onClick]); }, [autoload, scrolledTop, count, onClick]);
/** Set state while scrolling. */ /** Set state while scrolling. */
const handleScroll = useCallback(throttle(() => { const handleScroll = useCallback(throttle(() => {