mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 19:54:44 -07:00
fix error types for new error boundary lib upgrade
This commit is contained in:
parent
89abb3aa99
commit
6a4c7aa70a
1 changed files with 3 additions and 3 deletions
|
|
@ -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}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue