@multiversx/sdk-dapp-swap
Version:
A library to hold the main logic for swapping between tokens on the MultiversX blockchain
3 lines (2 loc) • 482 B
JavaScript
import{f as i}from"./chunk-5W737WN4.js";i();import{useEffect as b}from"react";var S=({tokens:o,hasMore:r,pageSize:a,isLoading:c,observerId:e,loadedCursors:g,currentCursor:t,setPagination:p})=>{b(()=>{if(!e)return;let n=document.getElementById(e);if(!n)return;let s=new IntersectionObserver(f=>{f[0].isIntersecting&&r&&!c&&t&&!g.has(t)&&p({first:a,after:t})},{threshold:1});return s.observe(n),()=>{s.disconnect()}},[o,e])};export{S as a};
//# sourceMappingURL=chunk-E7RPY3JC.js.map