mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-28 07:18:57 +03:00
bump copy-to-clipboard to 4.0.2 (#24353)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user