Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Burobin committed Oct 1, 2024
1 parent 2ba5902 commit 7631ca0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ClipboardButton/ClipboardButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ export function ClipboardButton(props: ClipboardButtonProps) {

const timerIdRef = React.useRef<number>();
const [tooltipCloseDelay, setTooltipCloseDelay] = React.useState<number | undefined>(undefined);
const [tooltipDisabled, setTooltipDisabled] = React.useState<boolean>(false);
const [tooltipDisabled, setTooltipDisabled] = React.useState(false);

React.useEffect(() => window.clearTimeout(timerIdRef.current), []);

const handleCopy: OnCopyHandler = React.useCallback(
(...args) => {
onCopy?.(...args);
(text, result) => {

Check warning on line 119 in src/components/ClipboardButton/ClipboardButton.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

'text' is already declared in the upper scope on line 102 column 9
onCopy?.(text, result);
setTooltipDisabled(false);
setTooltipCloseDelay(timeout);

Expand Down

0 comments on commit 7631ca0

Please sign in to comment.