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';
import { safeExecute } from '@/utils/logger';
interface Props {
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}
}
onClick={async () => {
await safeExecute(
() => window.electronAPI.app.showLogsFolder(),
'Failed to open logs folder'
);
}}
>
Show Logs Folder