Error boundary for the sync section with specialized recovery actions. Wraps BaseErrorBoundary with sync-specific configuration.
export const SyncErrorBoundary: React.FC<SyncErrorBoundaryProps> = ({ children, onReset, onRetryFailed, onCancelSync,}) => { const recoveryActions: RecoveryAction[] = [ { label: "Retry Failed Operations", Icon: RefreshCw, handler: onRetryFailed ?? (() => {}), variant: "default", }, { label: "Cancel Sync", Icon: XCircle, handler: onCancelSync ?? (() => {}), variant: "outline", }, { label: "Reset Sync State", Icon: RefreshCw, handler: onReset ?? (() => {}), variant: "outline", }, ]; return ( <BaseErrorBoundary title="Sync Error" description="An error occurred during synchronization" HeaderIcon={AlertTriangle} recoveryActions={recoveryActions} section="sync" > {children} </BaseErrorBoundary> );}; Copy
export const SyncErrorBoundary: React.FC<SyncErrorBoundaryProps> = ({ children, onReset, onRetryFailed, onCancelSync,}) => { const recoveryActions: RecoveryAction[] = [ { label: "Retry Failed Operations", Icon: RefreshCw, handler: onRetryFailed ?? (() => {}), variant: "default", }, { label: "Cancel Sync", Icon: XCircle, handler: onCancelSync ?? (() => {}), variant: "outline", }, { label: "Reset Sync State", Icon: RefreshCw, handler: onReset ?? (() => {}), variant: "outline", }, ]; return ( <BaseErrorBoundary title="Sync Error" description="An error occurred during synchronization" HeaderIcon={AlertTriangle} recoveryActions={recoveryActions} section="sync" > {children} </BaseErrorBoundary> );};
Error boundary for the sync section with specialized recovery actions. Wraps BaseErrorBoundary with sync-specific configuration.
Source