import { FlexGrowRow } from '@xylabs/react-flexbox' import type { PropsWithChildren } from 'react' import React from 'react' import { NotFound } from './NotFound.tsx' export interface LoadResultProps { /** @deprecated - use error prop */ apiError?: Error /** Defer error handling to the children and load them */ error?: boolean notFound: boolean searchResult: T | undefined } export function LoadResult(props: PropsWithChildren>) { const { notFound, error, searchResult, children, } = props if (notFound) { return } if (error) { return <>{children} } return searchResult === undefined ? : <>{children} }