From 8d89deee2e73bca412281a40168a2868ed35ced3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Mon, 21 Nov 2022 12:32:32 +0100 Subject: [PATCH] Fix ESLint `react-hooks/exhaustive-deps` --- website/src/components/copy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/components/copy.js b/website/src/components/copy.js index a59222717..4caabac98 100644 --- a/website/src/components/copy.js +++ b/website/src/components/copy.js @@ -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)