import * as React from 'react'; import SentryTypes from 'app/sentryTypes'; import {Project} from 'app/types'; import getDisplayName from 'app/utils/getDisplayName'; type InjectedProjectProps = { project?: Project; }; /** * Currently wraps component with project from context */ const withProject =

( WrappedComponent: React.ComponentType

) => class extends React.Component< Omit & Partial > { static displayName = `withProject(${getDisplayName(WrappedComponent)})`; static contextTypes = { project: SentryTypes.Project, }; render() { const {project, ...props} = this.props; return ( ); } }; export default withProject;