import {Project} from 'sentry/types'; import getDisplayName from 'sentry/utils/getDisplayName'; import useProjects from 'sentry/utils/useProjects'; type InjectedProjectsProps = { projects: Project[]; loadingProjects?: boolean; }; /** * Higher order component that uses ProjectsStore and provides a list of projects */ function withProjects

( WrappedComponent: React.ComponentType

) { type Props = Omit; const Wrapper: React.FC = props => { const {projects, initiallyLoaded} = useProjects(); const loadingProjects = !initiallyLoaded; return ; }; Wrapper.displayName = `withProjects(${getDisplayName(WrappedComponent)})`; return Wrapper; } export default withProjects;