"use client" import { useState } from "react" import { Check, Copy } from "lucide-react" /** A labeled, copy-pasteable BibTeX block. */ export function CiteBlock({ bibtex, label = "BibTeX" }: { bibtex: string; label?: string }) { const [copied, setCopied] = useState(false) const copy = async () => { try { await navigator.clipboard.writeText(bibtex) setCopied(true) setTimeout(() => setCopied(false), 1800) } catch { // clipboard unavailable — the text is still selectable in the
.
}
}
return (
{label}
{bibtex}
)
}