"use client"; import { useState } from "react"; import { Check, Copy } from "lucide-react"; /** * An email address that opens a mail client on click, with a copy button * that fades in only on hover (invisible at rest) so lists of these don't * look cluttered with icons. */ export function CopyableEmail({ email }: { email: string }) { const [copied, setCopied] = useState(false); const copy = async () => { await navigator.clipboard.writeText(email); setCopied(true); setTimeout(() => setCopied(false), 1200); }; return ( {email} ); }