This commit is contained in:
freedakgmail
2025-12-21 17:32:33 +08:00
parent cffdd75e96
commit 5c8c70097c
190 changed files with 2746 additions and 893 deletions
+3 -1
View File
@@ -18,6 +18,7 @@ import {
} from "@/components/ui/table"
import { Button } from "@/components/ui/button"
import { Skeleton } from "@/components/ui/skeleton"
import { useDialog } from "@/components/ui/alert-dialog-custom"
interface Collaborator {
id: string
@@ -82,6 +83,7 @@ interface LoginLog {
export default function AdminPage() {
const { data: session, status } = useSession()
const router = useRouter()
const { showAlert } = useDialog()
const [users, setUsers] = useState<UserInfo[]>([])
const [stats, setStats] = useState<Stats | null>(null)
const [loading, setLoading] = useState(true)
@@ -176,7 +178,7 @@ export default function AdminPage() {
)
)
} catch (err) {
alert(err instanceof Error ? err.message : "操作失败")
await showAlert(err instanceof Error ? err.message : "操作失败", "错误")
} finally {
setUpdating(null)
}