Show scroll top button regardless of scroll position if there are new posts and auto-loading is disabled
This commit is contained in:
committed by
nicole mikołajczyk
parent
13037847c3
commit
740437d9f6
@ -36,7 +36,7 @@ const ScrollTopButton: React.FC<IScrollTopButton> = ({
|
||||
// Whether we are scrolled above the `autoloadThreshold`.
|
||||
const [scrolledTop, setScrolledTop] = useState<boolean>(false);
|
||||
|
||||
const visible = count > 0 && scrolled;
|
||||
const visible = count > 0 && (!autoloadTimelines || scrolled);
|
||||
|
||||
/** Number of pixels scrolled down from the top of the page. */
|
||||
const getScrollTop = (): number => (document.scrollingElement || document.documentElement).scrollTop;
|
||||
|
||||
Reference in New Issue
Block a user