'use client'; import { Check, Copy } from 'lucide-react'; import { useState } from 'react'; /** Compact, copyable contract address — short display, full value to clipboard. */ export function CopyAddress({ address }: { address: string }) { const [copied, setCopied] = useState(false); const handleCopy = async () => { try { await navigator.clipboard.writeText(address); setCopied(true); setTimeout(() => setCopied(false), 2000); } catch { // Clipboard unavailable (e.g. insecure context) — silently no-op. } }; const short = `${address.slice(0, 4)}…${address.slice(-4)}`; return ( ); }