diff --git a/client/src/components/JsonView.tsx b/client/src/components/JsonView.tsx index 1febff6a4..1eb2bbb74 100644 --- a/client/src/components/JsonView.tsx +++ b/client/src/components/JsonView.tsx @@ -51,7 +51,7 @@ const JsonView = memo( variant: "destructive", }); } - }, [toast, normalizedData]); + }, [toast, normalizedData, setCopied]); return (
diff --git a/client/src/lib/hooks/useCopy.ts b/client/src/lib/hooks/useCopy.ts index 8dd7e401b..148d603da 100644 --- a/client/src/lib/hooks/useCopy.ts +++ b/client/src/lib/hooks/useCopy.ts @@ -21,7 +21,7 @@ function useCopy({ timeout = 500 }: UseCopyProps = {}) { clearTimeout(timeoutId); } }; - }, [copied]); + }, [copied, timeout]); return { copied, setCopied }; }