mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* Fix multiple timer issue in CopyButton by using useRef This commit resolves a bug where rapidly clicking the Copy button in the CopyButton component would initiate multiple overlapping timers, leading to unpredictable copy state toggling. By utilizing useRef, we now ensure a single timer instance is managed and cleared appropriately, stabilizing the copy functionality. * Remove null assignment to timerRef.current before setting new timeout --------- Co-authored-by: Mattermost Build <build@mattermost.com>