import { useState } from 'react' import { shortHash } from '../../lib/format.js' export default function EvidenceHash({ hash }) { const [copied, setCopied] = useState(false) if (!hash) return const copy = () => { navigator.clipboard?.writeText(hash).then(() => { setCopied(true) setTimeout(() => setCopied(false), 1500) }) } return ( {shortHash(hash)} ) }