'use client' /** * ErrorOverviewCard - #41 錯誤統計卡片 * ===================================== * Phase 10: Sentry + OpenClaw + UI 整合 * * Nothing.tech 視覺規範: * - 純白底色 (bg-white) * - 極細淺灰邊框 (border border-gray-200) * - 無圓角或微圓角 (rounded-sm) * - 嚴禁陰影 (shadow-none) * * 建立: 2026-03-26 (台北時區) * 建立者: Claude Code (#41 Error UI) */ import { useTranslations } from 'next-intl' import { cn } from '@/lib/utils' import { AlertTriangle, Bug, Clock, TrendingUp, TrendingDown, Minus } from 'lucide-react' import type { ErrorStatsResponse } from '@/lib/api-client' // ============================================================================= // Component Props // ============================================================================= interface ErrorOverviewCardProps { stats: ErrorStatsResponse | null loading?: boolean error?: string | null changePercent?: number className?: string } // ============================================================================= // Component // ============================================================================= export function ErrorOverviewCard({ stats, loading = false, error = null, changePercent = 0, className, }: ErrorOverviewCardProps) { const t = useTranslations('errors') // Loading state if (loading) { return (
{t('noData')}