import { AlertCircle, RefreshCw } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; export interface ErrorFallbackProps { title: string; description: string; error: Error | null; actionLabel: string; onAction: () => void; variant?: 'app' | 'page'; showStack?: boolean; className?: string; } export function ErrorFallback({ title, description, error, actionLabel, onAction, variant = 'page', showStack = false, className, }: ErrorFallbackProps) { const isApp = variant === 'app'; const errorText = error ? (showStack ? error.stack || error.toString() : error.toString()) : null; return (
{description}
{errorText && (
{errorText}