index.tsx 1017 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(props: Omit<RelayWrapper['props'], 'organization'>) {
  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 organization={organization} {...props} />
  28. </Feature>
  29. );
  30. }
  31. export default OrganizationRelay;