From 7e781631bb4028014d657bf661cfa7bfa1edb576 Mon Sep 17 00:00:00 2001 From: david_bai Date: Fri, 27 Mar 2026 17:20:49 +0800 Subject: [PATCH] chore(ui): clear remaining frontend warnings Resolve the remaining lint warnings without changing behavior by fixing hook dependency lists, removing the icon naming false positive, and switching the YouTube thumbnail to next/image for compliant rendering. --- .../components/ClipboardApp/FileListDisplay.tsx | 13 ++++++++++++- .../components/Editor/EditorToolbar/InsertTools.tsx | 4 ++-- .../components/Editor/hooks/useEditorCommands.ts | 12 ++++++------ frontend/components/common/YouTubePlayer.tsx | 5 ++++- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/frontend/components/ClipboardApp/FileListDisplay.tsx b/frontend/components/ClipboardApp/FileListDisplay.tsx index ad20ee7..c0aedc7 100644 --- a/frontend/components/ClipboardApp/FileListDisplay.tsx +++ b/frontend/components/ClipboardApp/FileListDisplay.tsx @@ -225,6 +225,9 @@ const FileListDisplay: React.FC = ({ fileProgresses, showFinished, activeTransfers, + mode, + clearSendProgress, + clearReceiveProgress, folders, singleFiles, ]); @@ -286,7 +289,15 @@ const FileListDisplay: React.FC = ({ // Update the last status prevShowFinishedRef.current[item.fileId] = currentShowFinished; }); - }, [showFinished, singleFiles, folders, saveType, onDownload]); + }, [ + showFinished, + singleFiles, + folders, + saveType, + onDownload, + activeTransfers, + fileProgresses, + ]); //Actions corresponding to each file - progress, download, delete const renderItemActions = (item: FileMeta) => { diff --git a/frontend/components/Editor/EditorToolbar/InsertTools.tsx b/frontend/components/Editor/EditorToolbar/InsertTools.tsx index 5421011..dac3105 100644 --- a/frontend/components/Editor/EditorToolbar/InsertTools.tsx +++ b/frontend/components/Editor/EditorToolbar/InsertTools.tsx @@ -1,4 +1,4 @@ -import { Link2, Image, Code } from "lucide-react"; +import { Link2, Image as ImageIcon, Code } from "lucide-react"; interface InsertToolsProps { insertLink: () => void; @@ -25,7 +25,7 @@ export function InsertTools({ onClick={insertImage} title="Upload image" > - +