From af5af57d4b407aa98c4e70bb4647a9a87dfa00ad Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Thu, 9 Oct 2025 19:47:26 +0800 Subject: [PATCH] fix: remove 2 unused variables in hooks and TabContext - useDragToDesktop.ts: removed unused onSuccess in dragFolderToDesktop - TabContext.tsx: removed unused useTranslation import and t variable Continued reducing frontend lint errors --- src/ui/Mobile/Navigation/Tabs/TabContext.tsx | 2 -- src/ui/hooks/useDragToDesktop.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ui/Mobile/Navigation/Tabs/TabContext.tsx b/src/ui/Mobile/Navigation/Tabs/TabContext.tsx index 6b536ba3..c12a2bf9 100644 --- a/src/ui/Mobile/Navigation/Tabs/TabContext.tsx +++ b/src/ui/Mobile/Navigation/Tabs/TabContext.tsx @@ -5,7 +5,6 @@ import React, { useRef, type ReactNode, } from "react"; -import { useTranslation } from "react-i18next"; import type { TabContextTab } from "../../../types/index.js"; export type Tab = TabContextTab; @@ -34,7 +33,6 @@ interface TabProviderProps { } export function TabProvider({ children }: TabProviderProps) { - const { t } = useTranslation(); const [tabs, setTabs] = useState([]); const [currentTab, setCurrentTab] = useState(null); const nextTabId = useRef(1); diff --git a/src/ui/hooks/useDragToDesktop.ts b/src/ui/hooks/useDragToDesktop.ts index 4567634e..f275291a 100644 --- a/src/ui/hooks/useDragToDesktop.ts +++ b/src/ui/hooks/useDragToDesktop.ts @@ -248,7 +248,7 @@ export function useDragToDesktop({ sshSessionId }: UseDragToDesktopProps) { const dragFolderToDesktop = useCallback( async (folder: FileItem, options: DragToDesktopOptions = {}) => { - const { enableToast = true, onSuccess, onError } = options; + const { enableToast = true, onError } = options; if (!isElectron()) { const error =