import omit from 'lodash/omit'; import GenericDiscoverQuery, { DiscoverQueryProps, GenericChildrenProps, } from 'sentry/utils/discover/genericDiscoverQuery'; import withApi from 'sentry/utils/withApi'; import {SpanOps} from './types'; type SpanOpsProps = {}; type RequestProps = DiscoverQueryProps & SpanOpsProps; type ChildrenProps = Omit, 'tableData'> & { spanOps: SpanOps | null; }; type Props = RequestProps & { children: (props: ChildrenProps) => React.ReactNode; }; function SpanOpsQuery(props: Props) { return ( route="events-span-ops" limit={20} {...omit(props, 'children')} > {({tableData, ...rest}) => { return props.children({spanOps: tableData, ...rest}); }} ); } export default withApi(SpanOpsQuery);