From c86ee488c439ec900f4f0cf8724842727281e74a Mon Sep 17 00:00:00 2001 From: xintaofei Date: Sun, 15 Mar 2026 23:26:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9E=84=E5=BB=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/aux-panel-file-tree-tab.tsx | 4 ++-- src/components/layout/unstash-dialog.tsx | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/layout/aux-panel-file-tree-tab.tsx b/src/components/layout/aux-panel-file-tree-tab.tsx index 6fb3835..2b14017 100644 --- a/src/components/layout/aux-panel-file-tree-tab.tsx +++ b/src/components/layout/aux-panel-file-tree-tab.tsx @@ -2302,7 +2302,7 @@ export function FileTreeTab() { { e.preventDefault() - const input = e.currentTarget.querySelector("input") + const input = (e.currentTarget as HTMLElement | null)?.querySelector("input") if (input) requestAnimationFrame(() => input.focus()) }} > @@ -2369,7 +2369,7 @@ export function FileTreeTab() { { e.preventDefault() - const input = e.currentTarget.querySelector("input") + const input = (e.currentTarget as HTMLElement | null)?.querySelector("input") if (input) requestAnimationFrame(() => input.focus()) }} > diff --git a/src/components/layout/unstash-dialog.tsx b/src/components/layout/unstash-dialog.tsx index 976f93d..6464810 100644 --- a/src/components/layout/unstash-dialog.tsx +++ b/src/components/layout/unstash-dialog.tsx @@ -360,7 +360,6 @@ export function StashWorkspace({ folderPath }: StashWorkspaceProps) { handleSelectFile(stash.ref_name, file) } renderNode={(node) => renderNode(node, stash.ref_name)} - t={t} /> ))} @@ -409,7 +408,6 @@ interface StashCardProps { onDrop: () => void onSelectFile: (file: string) => void renderNode: (node: TreeNode) => React.ReactNode - t: ReturnType } function StashCard({ @@ -424,8 +422,8 @@ function StashCard({ onDrop, onSelectFile, renderNode, - t, }: StashCardProps) { + const t = useTranslations("Folder.branchDropdown.unstashDialog") const [confirmApplyOpen, setConfirmApplyOpen] = useState(false) const tree = useMemo(() => (files ? buildFileTree(files) : []), [files])