()
| 135 | const { setTimeout } = useTimeout() |
| 136 | |
| 137 | const handleCopy = async () => { |
| 138 | try { |
| 139 | await copyTextToClipboard(textToCopy, { |
| 140 | suppressGlobalMessage: true, |
| 141 | }) |
| 142 | const newState = copyButtonHandlers.handleCopy() |
| 143 | setIsCopied(newState.isCopied) |
| 144 | setIsHovered(newState.isHovered) |
| 145 | setTimeout('reset-copied', () => setIsCopied(false), COPIED_RESET_DELAY_MS) |
| 146 | } catch (_error) { |
| 147 | // Error is already logged and displayed by copyTextToClipboard |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | const handleMouseOver = () => { |
| 152 | const shouldHover = copyButtonHandlers.handleMouseOver(isCopied) |
nothing calls this directly
no test coverage detected