'use client'; import { AlertCircle, RefreshCw, X } from 'lucide-react'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; interface ErrorDisplayProps { error: string | Error; onRetry?: () => void; onDismiss?: () => void; className?: string; } export function ErrorDisplay({ error, onRetry, onDismiss, className }: ErrorDisplayProps) { const errorMessage = error instanceof Error ? error.message : String(error); return (
{errorMessage}
{(onRetry || onDismiss) && (