From f7f8a3a2d0ca0125c559c5bebf2a8f88145c0ce0 Mon Sep 17 00:00:00 2001 From: pipercucu Date: Mon, 27 Nov 2023 21:16:26 -0400 Subject: [PATCH] Adjust join community bubbles at end to pop sooner, currently waits until user is entirely done scrolling --- src/components/Community.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Community.tsx b/src/components/Community.tsx index 582d234..8f47a95 100644 --- a/src/components/Community.tsx +++ b/src/components/Community.tsx @@ -196,9 +196,11 @@ const Community = () => { useEffect(() => { // set at bottom if at bottom const handleScroll = () => { + const innerHeight = window.innerHeight; + if ( - window.innerHeight + window.scrollY >= - document.body.offsetHeight - 2 + innerHeight + window.scrollY >= + document.body.offsetHeight - innerHeight ) { setAtBottom(true); }