0.8.0.0
This commit is contained in:
+3
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user