Fix ESLint react-hooks/exhaustive-deps

This commit is contained in:
Marcus Blättermann 2022-11-21 12:32:32 +01:00
parent cb7880d3a6
commit 3c93913bb9
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D

View File

@ -20,7 +20,7 @@ export default function CopyInput({ text, prefix }) {
useEffect(() => {
setSupportsCopy(isClient && document.queryCommandSupported('copy'))
}, [])
}, [isClient])
const textareaRef = useRef()
const [copySuccess, setCopySuccess] = useState(false)
const onClick = () => copyToClipboard(textareaRef, setCopySuccess)