import React from 'react'; import SentryTypes from 'app/sentryTypes'; import {LightWeightOrganization, Organization} from 'app/types'; import getDisplayName from 'app/utils/getDisplayName'; type InjectedOrganizationProps = { organization?: Organization | LightWeightOrganization; }; const withOrganization =
( WrappedComponent: React.ComponentType
) => class extends React.Component< Omit
& InjectedOrganizationProps
> {
static displayName = `withOrganization(${getDisplayName(WrappedComponent)})`;
static contextTypes = {
organization: SentryTypes.Organization,
};
render() {
const {organization, ...props} = this.props;
return (