import {cloneElement, isValidElement} from 'react'; import Feature from 'sentry/components/acl/feature'; import NoProjectMessage from 'sentry/components/noProjectMessage'; import type {Organization} from 'sentry/types/organization'; import withOrganization from 'sentry/utils/withOrganization'; type Props = { organization: Organization; children?: React.ReactNode; }; function TeamInsightsContainer({children, organization}: Props) { return ( {children && isValidElement(children) ? cloneElement(children, { organization, }) : (children as React.ReactChild)} ); } export default withOrganization(TeamInsightsContainer);