()
| 382 | const copy = useCallback((id: string, line: string) => { |
| 383 | setCopying((current) => ({ ...current, [id]: (current[id] ?? 0) + 1 })); |
| 384 | const finishCopy = (): void => { |
| 385 | setCopying((current) => { |
| 386 | const count = current[id] ?? 0; |
| 387 | if (count <= 1) { |
| 388 | const { [id]: _finished, ...rest } = current; |
| 389 | return rest; |
| 390 | } |
| 391 | return { ...current, [id]: count - 1 }; |
| 392 | }); |
| 393 | }; |
| 394 | const fallback = (): void => { |
| 395 | try { |
| 396 | const field = document.createElement('textarea'); |
no outgoing calls
no test coverage detected