"use client" import Link from "next/link" import { ArrowRightIcon, ShieldAlertIcon } from "lucide-react" import type { DashboardAlert } from "@/lib/api/dashboard" import { Badge } from "@/components/ui/badge" import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card" type AlertListProps = { alerts: DashboardAlert[] } function getAlertBadgeVariant(level: DashboardAlert["level"]) { if (level === "error") { return "destructive" as const } if (level === "warning") { return "secondary" as const } return "outline" as const } export function AlertList({ alerts }: AlertListProps) { return ( 风险提醒 优先处理会直接影响接待效率和 AI 稳定性的项目 {alerts.length === 0 ? (
当前没有需要优先处理的风险项
首页将持续监控会话堆积、客服排班与 AI 配置异常
) : ( alerts.map((item) => (
{item.title}
{item.count}
{item.description}
)) )}
) }