UNPKG

@sofaws/dapp-core

Version:

A library to hold the main logic for a dapp on the Elrond Network

3 lines (2 loc) 641 B
import{a as u}from"./chunk-X5XGIZAO.js";import{a as h,b as c,d as l,m as f}from"./chunk-HBP5N4FR.js";f();import t,{useCallback as k,useMemo as x,memo as A}from"react";import C from"anchorme";var P=b=>{var p=b,{children:a}=p,s=l(p,["children"]);let n=a,i=k(()=>{let m=C.list(n);if(m.length===0)return n;let e=[],r=0;return m.forEach((o,d)=>{o.start>r&&e.push(n.substring(r,o.start)),e.push(t.createElement(u,c(h({},s),{key:d,href:o.string}))),r=o.end}),n.length>r&&e.push(n.substring(r)),e.length===1?e[0]:e},[n,s]),g=x(()=>i(),[i]);return t.createElement(t.Fragment,null,g)},j=A(P);export{j as a}; //# sourceMappingURL=chunk-SGWTG3A3.js.map