subscriptionContext.tsx 487 B

1234567891011121314151617181920
  1. import {Fragment} from 'react';
  2. import useOrganization from 'sentry/utils/useOrganization';
  3. import ContactBillingMembers from 'getsentry/views/contactBillingMembers';
  4. type Props = {
  5. children?: React.ReactNode;
  6. };
  7. function SubscriptionContext(props: Props) {
  8. const organization = useOrganization();
  9. return organization.access.includes('org:billing') ? (
  10. <Fragment>{props.children}</Fragment>
  11. ) : (
  12. <ContactBillingMembers />
  13. );
  14. }
  15. export default SubscriptionContext;