"use client"; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Database, TrendingUp, Users, Activity } from 'lucide-react'; import { StatsOverview } from '@/lib/types'; interface StatsCardsProps { stats: StatsOverview | null; loading?: boolean; } export function StatsCards({ stats, loading }: StatsCardsProps) { if (loading) { return (
{Array.from({ length: 4 }).map((_, i) => ( 加载中...
--
))}
); } if (!stats) { return null; } return (
总账户数
{stats.totalAccounts}
平台数量
{Object.keys(stats.platformSummary).length}

{Object.entries(stats.platformSummary).slice(0, 3).map(([platform, count]) => ( `${platform}: ${count}` )).join(', ')}

所有者数量
{Object.keys(stats.ownerSummary).length}

{Object.entries(stats.ownerSummary).slice(0, 3).map(([owner, count]) => ( `${owner}: ${count}` )).join(', ')}

可用账户
{(stats.statusSummary.available || 0) + (stats.statusSummary.exported || 0)}

可用: {stats.statusSummary.available || 0} | 已导出: {stats.statusSummary.exported || 0}

已锁定: {stats.statusSummary.locked || 0} | 已封禁: {stats.statusSummary.banned || 0}

); }