"use client"; import { CheckIcon, CopyIcon } from "@radix-ui/react-icons"; import { useState } from "react"; import type { ThirdwebClient } from "../../../../client/client.js"; import type { WalletId } from "../../../../wallets/wallet-types.js"; import { fontSize, iconSize, spacing, } from "../../../core/design-system/index.js"; import { AccentFailIcon } from "../../ui/ConnectWallet/icons/AccentFailIcon.js"; import { Container, ModalHeader, ScreenBottomContainer, } from "../../ui/components/basic.js"; import { Button } from "../../ui/components/buttons.js"; import { QRCode } from "../../ui/components/QRCode.js"; import { Spacer } from "../../ui/components/Spacer.js"; import { Text } from "../../ui/components/text.js"; import { WalletImage } from "../../ui/components/WalletImage.js"; /** * @internal */ export const ScanScreen: React.FC<{ onBack?: () => void; onGetStarted?: () => void; qrCodeUri?: string; walletName: string; walletId: WalletId; qrScanInstruction: string; getStartedLink: string; error: boolean; onRetry: () => void; connectModalSize: "compact" | "wide"; client: ThirdwebClient; }> = (props) => { const { connectModalSize, client } = props; const [linkCopied, setLinkCopied] = useState(false); return ( {!props.error && (
} qrCodeUri={props.qrCodeUri} /> {props.qrScanInstruction}
)} {props.error && ( Connection Failed )}
{props.onGetStarted && ( )}
); };