@privy-io/react-auth
Version:
React client for the Privy Auth API
2 lines (1 loc) • 2.35 kB
JavaScript
import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{L as o}from"./Link-DJ5gq9Di.mjs";import{T as i,a as l}from"./TodoList-CgrU7uwu.mjs";import{a}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as n}from"./ScreenLayout-DTmQLGPf.mjs";import"styled-components";import"lucide-react";import"react";import"@privy-io/are-addresses-equal";import"./context-WTldtXS8.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-D8-mhjp4.mjs";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CV4p7L0b.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const s=({walletName:a,installLink:s,title:m,subtitle:c="Follow the instructions below to get started.",onReload:p,onBack:d})=>{let u=m||`Create a ${a} wallet`.replace(/wallet wallet/gi,"wallet");/*#__PURE__*/return t(n,{title:u,subtitle:c,onBack:d,showBack:!0,primaryCta:{label:"Reload the page to use your wallet",onClick:p},helpText:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:"Still not sure? "}),/*#__PURE__*/t(o,{size:"sm",target:"_blank",href:"https://solana.com/docs/intro/wallets",children:"Learn more"})]}),watermark:!0,children:/*#__PURE__*/e(i,{children:[/*#__PURE__*/t(l,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/t("span",{children:"Install the "})," ",/*#__PURE__*/e(o,{href:s,target:"_blank",children:[a," browser extension"]})]})}),/*#__PURE__*/t(l,{children:"Set up your first wallet"}),/*#__PURE__*/t(l,{children:"Store your recovery phrase in a safe place!"})]})})},m={component:()=>{let{navigateBack:e,data:r}=a();if(!r?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:o}=r.installWalletModalData;/*#__PURE__*/return t(s,{walletName:o.name,installLink:o.installLink,onReload:()=>{window.location.reload()},onBack:e})}};export{m as InstallWalletScreen,s as InstallWalletScreenView,m as default};