Skip to content

Commit

Permalink
fix: adjust offset calc
Browse files Browse the repository at this point in the history
  • Loading branch information
shadcn committed Jun 15, 2023
1 parent aa98b5b commit 19726fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hooks/use-at-bottom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
Expand Down

0 comments on commit 19726fe

Please sign in to comment.