import { AnimatePresence, motion } from 'motion/react'; import { AlertCircle, CheckCircle2 } from 'lucide-react'; import type { UploadResult } from './types'; interface UploadFeedbackProps { result: UploadResult | null; error: string | null; onCloseResult: () => void; onCloseError: () => void; } export function UploadFeedback({ result, error, onCloseResult, onCloseError }: UploadFeedbackProps) { return ( <> {result && (
上传成功:{result.filename}
)}
{error && (
{error}
)}
); } function Stat({ label, value, color }: { label: string; value: number; color: string }) { return (
{label}
{value}
); }