Skip to content

Commit

Permalink
Adjust join community bubbles at end to pop sooner, currently waits u…
Browse files Browse the repository at this point in the history
…ntil user is entirely done scrolling
  • Loading branch information
pipercucu committed Nov 28, 2023
1 parent 98b927b commit f7f8a3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f7f8a3a

Please sign in to comment.