Files
cunkebao_v3/Cunkebao/app/traffic-pool/components/pool-usage-chart.tsx
笔记本里的永平 5ff15472f5 feat: 本次提交更新内容如下
场景获客列表搞定
2025-07-07 17:08:27 +08:00

33 lines
906 B
TypeScript

"use client"
import { Card } from "@/components/ui/card"
import { Progress } from "@/components/ui/progress"
interface PoolUsageChartProps {
deviceStats: {
[key: string]: number
}
poolLimit: number
}
export function PoolUsageChart({ deviceStats, poolLimit }: PoolUsageChartProps) {
return (
<Card className="p-3">
<h3 className="text-sm font-medium mb-2">使</h3>
<div className="space-y-3">
{Object.entries(deviceStats).map(([device, count]) => (
<div key={device} className="space-y-1">
<div className="flex justify-between text-xs">
<span>{device}</span>
<span className="text-gray-500">
{count}/{poolLimit}
</span>
</div>
<Progress value={(count / poolLimit) * 100} />
</div>
))}
</div>
</Card>
)
}