Adjust rootMargin

This commit is contained in:
Lim Chee Aun 2024-01-03 10:54:55 +08:00
parent 72dc4cc81b
commit 3d4ebb8abe

View file

@ -453,7 +453,7 @@ function Timeline({
(showMore ? (
<InView
root={scrollableRef.current}
rootMargin={Math.max(screen.width, screen.height) + 'px'}
rootMargin={`0px 0px ${screen.height * 1.5}px 0px`}
onChange={(inView) => {
if (inView) {
loadItems();