diff --git a/ui/src/components/IssueProperties.tsx b/ui/src/components/IssueProperties.tsx index 397f930c..221c4889 100644 --- a/ui/src/components/IssueProperties.tsx +++ b/ui/src/components/IssueProperties.tsx @@ -1,4 +1,4 @@ -import { useCallback, useMemo, useRef, useState } from "react"; +import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { pickTextColorForPillBg } from "@/lib/color-contrast"; import { Link } from "@/lib/router"; import type { Issue } from "@paperclipai/shared"; @@ -25,6 +25,7 @@ import { AgentIcon } from "./AgentIconPicker"; function TruncatedCopyable({ value, icon: Icon }: { value: string; icon: React.ComponentType<{ className?: string }> }) { const [copied, setCopied] = useState(false); const timerRef = useRef>(undefined); + useEffect(() => () => clearTimeout(timerRef.current), []); const handleCopy = useCallback(async () => { try { await navigator.clipboard.writeText(value); diff --git a/ui/src/components/MarkdownEditor.tsx b/ui/src/components/MarkdownEditor.tsx index ff779926..b63fc79c 100644 --- a/ui/src/components/MarkdownEditor.tsx +++ b/ui/src/components/MarkdownEditor.tsx @@ -883,7 +883,7 @@ export const MarkdownEditor = forwardRef !bordered && "inset-0 rounded-sm", )} > - Drop file to upload + Drop {onDropFile ? "file" : "image"} to upload )} {uploadError && (