UNPKG

@sofaws/dapp-core

Version:

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

3 lines (2 loc) 529 B
import{a as c}from"./chunk-WU6HTRPR.js";import{a}from"./chunk-534JQDGS.js";import{a as s,f as i}from"./chunk-J6375EXR.js";import{m as n}from"./chunk-HBP5N4FR.js";n();import{useEffect as f}from"react";i();var{logoutEvent:m}=s,u="storage",y=()=>{let{address:t}=c();return f(()=>{let o=e=>{if(!(e.key!==m||!e.newValue))try{let{data:r}=JSON.parse(e.newValue);r===t&&a()}catch(r){return}};return window.addEventListener(u,o),()=>{window.removeEventListener(u,o)}},[t]),null};export{y as a}; //# sourceMappingURL=chunk-MIPNZ264.js.map