|
|
@@ -4,7 +4,7 @@ export function useScrollEnd() { |
|
|
|
|
|
|
|
const handleScroll = () => { |
|
|
|
const scrollPosition = window.innerHeight + window.scrollY |
|
|
|
const pageHeight = document.documentElement.offsetHeight |
|
|
|
const pageHeight = document.documentElement.offsetHeight - 1 // 1 pixel offset to fix mobile browser |
|
|
|
|
|
|
|
if (scrollPosition >= pageHeight && typeof callback === 'function') { |
|
|
|
callback() |
|
|
|