@sofaws/dapp-core
Version:
A library to hold the main logic for a dapp on the Elrond Network
3 lines (2 loc) • 1.48 kB
JavaScript
import{a as g}from"./chunk-TZSTJN6S.js";import{a as d}from"./chunk-NBYKQL5U.js";import{b as c}from"./chunk-V54HNRTY.js";import{a as m}from"./chunk-Z6EEROFL.js";import{a as l}from"./chunk-UER2QFWY.js";import{a as s}from"./chunk-OYNHAMT4.js";import{b as t}from"./chunk-I2NWMXXW.js";import{m as a}from"./chunk-HBP5N4FR.js";a();import o,{useEffect as N}from"react";import i from"classnames";var A=({loginRoute:e,title:p="Login",className:x="dapp-unlock-page",LedgerLoginButtonText:u="Ledger",description:f="Pick a login method",WalletConnectLoginButtonText:B="Maiar",ExtensionLoginButtonText:L="Extension",WebWalletLoginButtonText:b="Web wallet"})=>{let n={wrapper:i(c.home,t.dFlex,t.flexFill,t.alignItemsCenter,x),title:t.mb4,description:t.mb4,cardContainer:t.mAuto,card:i(t.card,t.my4,t.textCenter),cardBody:i(t.cardBody,t.py4,t.px2,t.pxSm2,t.mxLg4)},{isLoggedIn:r}=s();return N(()=>{r&&(window.location.href=e)},[r]),o.createElement("div",{className:n.wrapper},o.createElement("div",{className:n.cardContainer},o.createElement("div",{className:n.card},o.createElement("div",{className:n.cardBody},o.createElement("h4",{className:i(t.h4,t.title)},p),o.createElement("p",{className:n.description},f),o.createElement(l,{callbackRoute:e,loginButtonText:L}),o.createElement(g,{callbackRoute:e,loginButtonText:b}),o.createElement(m,{loginButtonText:u,callbackRoute:e}),o.createElement(d,{callbackRoute:e,loginButtonText:B})))))};export{A as a};
//# sourceMappingURL=chunk-RXRVRJ3R.js.map