bump copy-to-clipboard to 4.0.2 (#24353)

This commit is contained in:
Josh Hawkins
2026-09-15 12:03:20 -05:00
committed by GitHub
parent e0d4337a25
commit 4c648f8147
5 changed files with 15 additions and 20 deletions
+2 -2
View File
@@ -71,10 +71,10 @@ export function MessageBubble({
const [copied, setCopied] = useState(false);
const handleCopy = useCallback(() => {
const handleCopy = useCallback(async () => {
const text = content?.trim() || "";
if (!text) return;
if (copy(text)) {
if (await copy(text)) {
setCopied(true);
toast.success(t("button.copiedToClipboard", { ns: "common" }));
setTimeout(() => setCopied(false), 2000);