import { Alert, AlertTitle, AlertDescription } from "./components/ui/alert"; import { Button } from "./components/ui/button"; import { AlertTriangleIcon, RefreshCwIcon } from "lucide-react"; interface ErrorFallbackProps { error: { message: string }; resetErrorBoundary: () => void; } export const ErrorFallback = ({ error, resetErrorBoundary }: ErrorFallbackProps) => { // When encountering an error in the development mode, rethrow it and don't display the boundary. // The parent UI will take care of showing a more helpful dialog. if (process.env.NODE_ENV === 'development') throw error; return (
{error.message}