From 7631ca0019e62a6c3e54d3e28c72f11ef10836a1 Mon Sep 17 00:00:00 2001 From: Aleksandr Burobin Date: Tue, 1 Oct 2024 14:56:08 +0300 Subject: [PATCH] fix: fix --- src/components/ClipboardButton/ClipboardButton.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ClipboardButton/ClipboardButton.tsx b/src/components/ClipboardButton/ClipboardButton.tsx index f7c3d000eb..c30d42065e 100644 --- a/src/components/ClipboardButton/ClipboardButton.tsx +++ b/src/components/ClipboardButton/ClipboardButton.tsx @@ -111,13 +111,13 @@ export function ClipboardButton(props: ClipboardButtonProps) { const timerIdRef = React.useRef(); const [tooltipCloseDelay, setTooltipCloseDelay] = React.useState(undefined); - const [tooltipDisabled, setTooltipDisabled] = React.useState(false); + const [tooltipDisabled, setTooltipDisabled] = React.useState(false); React.useEffect(() => window.clearTimeout(timerIdRef.current), []); const handleCopy: OnCopyHandler = React.useCallback( - (...args) => { - onCopy?.(...args); + (text, result) => { + onCopy?.(text, result); setTooltipDisabled(false); setTooltipCloseDelay(timeout);