@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 533 B
JavaScript
import{a as i}from"./chunk-OI3JNSRI.js";import{h as d}from"./chunk-7QE2X3X4.js";import{m as c}from"./chunk-HBP5N4FR.js";c();i();import{useEffect as r,useState as h}from"react";var D=()=>{let{hash:n,pathname:o}=window.location,t=n.replace("#",""),s=t&&Object.values(d).includes(t)?t:"raw",[e,a]=h(t);return r(()=>{e&&e!=="raw"&&window.history.replaceState({},document==null?void 0:document.title,`${o}#${e}`)},[e,o]),{initialDecodeMethod:s,decodeMethod:e,setDecodeMethod:a}};export{D as a};
//# sourceMappingURL=chunk-SLWCAOGH.js.map