import { useState } from 'react' export default function Copy({ text }: { text: string }) { const [copied, setCopied] = useState(false) const copy = (e: any) => { e.stopPropagation() navigator.clipboard.writeText(text) setCopied(true) setTimeout(() => setCopied(false), 3000) } return copied ? ( ) : ( ) }