fix error types for new error boundary lib upgrade

This commit is contained in:
lone-cloud 2026-01-17 18:37:15 -08:00
parent 89abb3aa99
commit 6a4c7aa70a

View file

@ -11,7 +11,7 @@ const ErrorFallback = ({
error, error,
resetErrorBoundary, resetErrorBoundary,
}: { }: {
error: Error; error: unknown;
resetErrorBoundary: () => void; resetErrorBoundary: () => void;
}) => ( }) => (
<Center h="100%" style={{ minHeight: '25rem' }}> <Center h="100%" style={{ minHeight: '25rem' }}>
@ -29,7 +29,7 @@ const ErrorFallback = ({
</Text> </Text>
<Text size="xs" c="dimmed" style={{ fontFamily: 'monospace' }} mb="sm"> <Text size="xs" c="dimmed" style={{ fontFamily: 'monospace' }} mb="sm">
{error.message} {error instanceof Error ? error.message : String(error)}
</Text> </Text>
<Button <Button
@ -66,7 +66,7 @@ export const ErrorBoundary = ({ children }: ErrorBoundaryProps) => (
<ReactErrorBoundary <ReactErrorBoundary
FallbackComponent={ErrorFallback} FallbackComponent={ErrorFallback}
onError={(error) => { onError={(error) => {
window.electronAPI?.logs?.logError('App crashed with unhandled error:', error); window.electronAPI?.logs?.logError('App crashed with unhandled error:', error as Error);
}} }}
> >
{children} {children}