import { Alert, AlertTitle, AlertDescription } from "./components/ui/alert"; import { Button } from "./components/ui/button"; import { AlertTriangleIcon, RefreshCwIcon } from "lucide-react"; interface ErrorFallbackProps { error: Error; resetErrorBoundary: () => void; } export const ErrorFallback = ({ error, resetErrorBoundary }: ErrorFallbackProps) => { console.error('ErrorFallback caught:', error); if (import.meta.env.DEV) throw error; return (
{error.message}
{error.stack && (
{error.stack}
)}