fix: adjust offset calc
This commit is contained in:
parent
aa98b5b62f
commit
19726fe7de
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ export function useAtBottom(offset = 0) {
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
setIsAtBottom(
|
setIsAtBottom(
|
||||||
window.innerHeight + window.scrollY ===
|
window.innerHeight + window.scrollY >=
|
||||||
document.body.offsetHeight - offset
|
document.body.offsetHeight - offset
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue