import * as React from 'react'; import AsyncResourceErrorBoundary, { Props as ErrorBoundaryProps } from './AsyncResourceErrorBoundary'; interface AsyncResourceContentProps { fallback: NonNullable | null; errorComponent?: React.ComponentType; } type Props = AsyncResourceContentProps & ErrorBoundaryProps; const AsyncResourceContent = ({ children, fallback, errorMessage, errorComponent: ErrorComponent, }: React.PropsWithChildren>) => { const ErrorBoundary = ErrorComponent || AsyncResourceErrorBoundary; return ( {children} ); }; export default AsyncResourceContent;