From 539fc32fb99b99d7486af93628c4c13e122283e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Wed, 16 Mar 2022 09:04:15 +0100 Subject: [PATCH] fix(dashboard-v2): fix CopyButton's timeout --- packages/dashboard-v2/src/components/CopyButton.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/dashboard-v2/src/components/CopyButton.js b/packages/dashboard-v2/src/components/CopyButton.js index db5e9c21..479352d2 100644 --- a/packages/dashboard-v2/src/components/CopyButton.js +++ b/packages/dashboard-v2/src/components/CopyButton.js @@ -22,7 +22,7 @@ const TooltipContent = styled.div.attrs({ className: "bg-primary-light/10 text-palette-600 py-2 px-4 ", })``; -export const CopyButton = ({ value }) => { +export const CopyButton = ({ value, className }) => { const containerRef = useRef(); const [copied, setCopied] = useState(false); const [timer, setTimer] = useState(null); @@ -32,13 +32,13 @@ export const CopyButton = ({ value }) => { copy(value); setCopied(true); - setTimer(setTimeout(() => setCopied(false), 150000)); + setTimer(setTimeout(() => setCopied(false), 1500)); }, [value, timer]); useClickAway(containerRef, () => setCopied(false)); return ( -
+