'use client'; import { useState } from 'react'; export default function CopyLink({ link }: { link: string }) { const [copied, setCopied] = useState(false); const copy = async () => { await navigator.clipboard.writeText(link); setCopied(true); setTimeout(() => setCopied(false), 1800); }; return (
e.target.select()} className="w-full border border-line px-3 py-2 font-mono text-xs" />
); }