diff --git a/components/ErrorBoundary.tsx b/components/ErrorBoundary.tsx index 7c6783f..3b9f491 100644 --- a/components/ErrorBoundary.tsx +++ b/components/ErrorBoundary.tsx @@ -4,7 +4,7 @@ import React, { Component, ErrorInfo, ReactNode } from 'react'; interface Props { children?: ReactNode; - fallback?: (error: Error, reset: () => void) => ReactNode; + fallback?: (error: Error, retry: () => void, reset: () => void) => ReactNode; onError?: (error: Error, errorInfo: ErrorInfo) => void; } @@ -108,7 +108,7 @@ export class ErrorBoundary extends Component { } if (this.props.fallback) { - return this.props.fallback(this.state.error!, this.reset); + return this.props.fallback(this.state.error!, this.retry, this.reset); } return React.createElement('div', { className: 'flex items-center justify-center min-h-[200px]' }, diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 430dbc7..2799fc1 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -67,10 +67,10 @@ export function Navbar() { undefined value in a widget's state hook) shouldn't blank the whole header, just fall back to a compact retry (fixes #191). */} ( + fallback={(_error, retry) => (