import{aT as o,aq as i}from"./app-BgLa5dit.js";const n=400;function a(e){const l=()=>{if(!e.isFetching){if(e.scrollContainer){const{scrollContainer:t}=e,r=t.getBoundingClientRect().height+t.scrollTop,c=t.scrollHeight-n;if(r<c)return}else{const t=window.innerHeight+document.documentElement.scrollTop,r=document.documentElement.scrollHeight-n;if(t<r)return}e.fetchNextPage()}};o.useEffect(()=>{const t=i.throttle(l,200),r=e.scrollContainer||window;return e.hasMore&&r.addEventListener("scroll",t),()=>r.removeEventListener("scroll",t)},[e.hasMore,e.fetchNextPage,e.scrollContainer])}export{a as u};
//# sourceMappingURL=g56uS58q.chunk.js.map
