Problem
The copy-to-clipboard logic is duplicated across multiple components:
CopyIcon
CopyFeedback
CopyFeedbackNew
InputWithCopy
Each component has its own implementation of the same useState + debounce pattern, making maintenance harder and code harder to read.
Proposed Solution
Extract the shared logic into a custom useCopyToClipboard hook that can be reused across all components.
Benefits
- Reduces ~67 lines of duplicate code
- Single source of truth for copy behavior
- Easier to maintain and extend