fix: adjust offset calc

This commit is contained in:
shadcn 2023-06-15 15:49:25 +04:00
parent aa98b5b62f
commit 19726fe7de

View file

@ -6,7 +6,7 @@ export function useAtBottom(offset = 0) {
React.useEffect(() => {
const handleScroll = () => {
setIsAtBottom(
window.innerHeight + window.scrollY ===
window.innerHeight + window.scrollY >=
document.body.offsetHeight - offset
)
}