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])