import { ReactNode } from 'react'; import { Center, Stack, Text, Button, Alert, rem } from '@mantine/core'; import { AlertTriangle, FolderOpen } from 'lucide-react'; import { ErrorBoundary as ReactErrorBoundary } from 'react-error-boundary'; interface ErrorBoundaryProps { children: ReactNode; } const ErrorFallback = ({ error, resetErrorBoundary, }: { error: Error; resetErrorBoundary: () => void; }) => (
Application Error The application encountered an unexpected error and crashed. You can view the error details in the logs folder. {error.message}
); export const ErrorBoundary = ({ children }: ErrorBoundaryProps) => ( { window.electronAPI?.logs?.logError( 'App crashed with unhandled error:', error ); }} > {children} );