修复构建错误

This commit is contained in:
xintaofei
2026-03-15 23:26:20 +08:00
parent 176785ca6e
commit c86ee488c4
2 changed files with 3 additions and 5 deletions

View File

@@ -2302,7 +2302,7 @@ export function FileTreeTab() {
<DialogContent
onOpenAutoFocus={(e) => {
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() {
<DialogContent
onOpenAutoFocus={(e) => {
e.preventDefault()
const input = e.currentTarget.querySelector("input")
const input = (e.currentTarget as HTMLElement | null)?.querySelector("input")
if (input) requestAnimationFrame(() => input.focus())
}}
>

View File

@@ -360,7 +360,6 @@ export function StashWorkspace({ folderPath }: StashWorkspaceProps) {
handleSelectFile(stash.ref_name, file)
}
renderNode={(node) => renderNode(node, stash.ref_name)}
t={t}
/>
))}
</div>
@@ -409,7 +408,6 @@ interface StashCardProps {
onDrop: () => void
onSelectFile: (file: string) => void
renderNode: (node: TreeNode) => React.ReactNode
t: ReturnType<typeof useTranslations>
}
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])