Browse Source

fix(relay): Add missing feature flag instructions to Relay settings UI (#59087)

Matej Minar 1 year ago
parent
commit
8f677571ae
1 changed files with 15 additions and 0 deletions
  1. 15 0
      static/app/views/settings/organizationRelay/index.tsx

+ 15 - 0
static/app/views/settings/organizationRelay/index.tsx

@@ -1,4 +1,8 @@
 import Feature from 'sentry/components/acl/feature';
+import FeatureDisabled from 'sentry/components/acl/featureDisabled';
+import Panel from 'sentry/components/panels/panel';
+import PanelBody from 'sentry/components/panels/panelBody';
+import {t} from 'sentry/locale';
 import useOrganization from 'sentry/utils/useOrganization';
 
 import RelayWrapper from './relayWrapper';
@@ -10,6 +14,17 @@ function OrganizationRelay(props: Omit<RelayWrapper['props'], 'organization'>) {
       organization={organization}
       features={['relay']}
       hookName="feature-disabled:relay"
+      renderDisabled={p => (
+        <Panel>
+          <PanelBody withPadding>
+            <FeatureDisabled
+              features={p.features}
+              hideHelpToggle
+              featureName={t('Relay')}
+            />
+          </PanelBody>
+        </Panel>
+      )}
     >
       <RelayWrapper organization={organization} {...props} />
     </Feature>