index.tsx 930 B

12345678910111213141516171819202122232425262728293031323334
  1. import Feature from 'sentry/components/acl/feature';
  2. import FeatureDisabled from 'sentry/components/acl/featureDisabled';
  3. import Panel from 'sentry/components/panels/panel';
  4. import PanelBody from 'sentry/components/panels/panelBody';
  5. import {t} from 'sentry/locale';
  6. import useOrganization from 'sentry/utils/useOrganization';
  7. import {RelayWrapper} from './relayWrapper';
  8. function OrganizationRelay() {
  9. const organization = useOrganization();
  10. return (
  11. <Feature
  12. organization={organization}
  13. features="relay"
  14. hookName="feature-disabled:relay"
  15. renderDisabled={p => (
  16. <Panel>
  17. <PanelBody withPadding>
  18. <FeatureDisabled
  19. features={p.features}
  20. hideHelpToggle
  21. featureName={t('Relay')}
  22. />
  23. </PanelBody>
  24. </Panel>
  25. )}
  26. >
  27. <RelayWrapper />
  28. </Feature>
  29. );
  30. }
  31. export default OrganizationRelay;