修复所有lint警告和错误

This commit is contained in:
xintaofei
2026-03-26 21:47:13 +08:00
parent 5e5c48338b
commit f61f9fb025
20 changed files with 138 additions and 93 deletions

View File

@@ -3,7 +3,10 @@
import { Suspense, useCallback, useEffect, useState } from "react"
import { useSearchParams } from "next/navigation"
import { useTranslations } from "next-intl"
const getCurrentWindow = async () => { const m = await import("@tauri-apps/api/window"); return m.getCurrentWindow() }
const getCurrentWindow = async () => {
const m = await import("@tauri-apps/api/window")
return m.getCurrentWindow()
}
import { Loader2 } from "lucide-react"
import { CommitWorkspace } from "@/components/layout/commit-dialog"
import { AppTitleBar } from "@/components/layout/app-title-bar"
@@ -74,9 +77,7 @@ function CommitPageInner() {
}
}, [hasValidFolderId, normalizedFolderId])
const pageTitle = folder
? `${t("title")} · ${folder.name}`
: t("title")
const pageTitle = folder ? `${t("title")} · ${folder.name}` : t("title")
useEffect(() => {
document.title = `${pageTitle} - codeg`

View File

@@ -73,9 +73,7 @@ export default function LoginPage() {
/>
</div>
{error && (
<p className="text-sm text-destructive">{error}</p>
)}
{error && <p className="text-sm text-destructive">{error}</p>}
<button
type="submit"

View File

@@ -3,7 +3,10 @@
import { Suspense, useCallback, useEffect, useState } from "react"
import { useSearchParams } from "next/navigation"
import { useTranslations } from "next-intl"
const getCurrentWindow = async () => { const m = await import("@tauri-apps/api/window"); return m.getCurrentWindow() }
const getCurrentWindow = async () => {
const m = await import("@tauri-apps/api/window")
return m.getCurrentWindow()
}
import { Loader2 } from "lucide-react"
import { MergeWorkspace } from "@/components/merge/merge-workspace"
import { AppTitleBar } from "@/components/layout/app-title-bar"
@@ -76,9 +79,7 @@ function MergePageInner() {
}
}, [hasValidFolderId, normalizedFolderId])
const pageTitle = folder
? `${t("title")} · ${folder.name}`
: t("title")
const pageTitle = folder ? `${t("title")} · ${folder.name}` : t("title")
useEffect(() => {
document.title = `${pageTitle} - codeg`

View File

@@ -3,7 +3,10 @@
import { Suspense, useCallback, useEffect, useState } from "react"
import { useSearchParams } from "next/navigation"
import { useTranslations } from "next-intl"
const getCurrentWindow = async () => { const m = await import("@tauri-apps/api/window"); return m.getCurrentWindow() }
const getCurrentWindow = async () => {
const m = await import("@tauri-apps/api/window")
return m.getCurrentWindow()
}
import { Loader2 } from "lucide-react"
import { PushWorkspace } from "@/components/layout/push-workspace"
import { AppTitleBar } from "@/components/layout/app-title-bar"
@@ -74,9 +77,7 @@ function PushPageInner() {
}
}, [hasValidFolderId, normalizedFolderId])
const pageTitle = folder
? `${t("title")} · ${folder.name}`
: t("title")
const pageTitle = folder ? `${t("title")} · ${folder.name}` : t("title")
useEffect(() => {
document.title = `${pageTitle} - codeg`

View File

@@ -64,9 +64,7 @@ function StashPageInner() {
}
}, [hasValidFolderId, normalizedFolderId])
const pageTitle = folder
? `${t("title")} · ${folder.name}`
: t("title")
const pageTitle = folder ? `${t("title")} · ${folder.name}` : t("title")
useEffect(() => {
document.title = `${pageTitle} - codeg`