UNPKG

@multiversx/sdk-dapp-swap

Version:

A library to hold the main logic for swapping between tokens on the MultiversX blockchain

3 lines (2 loc) 472 B
import{f as i}from"./chunk-DKQLHRWP.js";i();import{useEffect as p}from"react";var u=({tokens:o,hasMore:r,isLoading:a,observerId:e,loadedCursors:c,currentCursor:t,setPagination:f})=>{p(()=>{if(!e)return;let n=document.getElementById(e);if(!n)return;let s=new IntersectionObserver(g=>{g[0].isIntersecting&&r&&!a&&t&&!c.has(t)&&f({first:20,after:t})},{threshold:1});return s.observe(n),()=>{s.disconnect()}},[o,e])};export{u as a}; //# sourceMappingURL=chunk-5GOKZ5VF.js.map