index.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. import {Fragment} from 'react';
  2. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  3. import {t} from 'sentry/locale';
  4. import ConfigStore from 'sentry/stores/configStore';
  5. import {useLegacyStore} from 'sentry/stores/useLegacyStore';
  6. import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
  7. import useOrganization from 'sentry/utils/useOrganization';
  8. import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader';
  9. import EarlyFeaturesSettingsForm from 'sentry/views/settings/earlyFeatures/settingsForm';
  10. import PermissionAlert from 'sentry/views/settings/organization/permissionAlert';
  11. export default function OrganizationGeneralSettings(props: RouteComponentProps<{}, {}>) {
  12. const {isSelfHosted} = useLegacyStore(ConfigStore);
  13. const organization = useOrganization();
  14. const access = new Set(organization.access);
  15. if (!isSelfHosted) {
  16. return null;
  17. }
  18. return (
  19. <Fragment>
  20. <SentryDocumentTitle title={t('General Settings')} orgSlug={organization.slug} />
  21. <div>
  22. <SettingsPageHeader title={t('Early Features')} />
  23. <PermissionAlert />
  24. <EarlyFeaturesSettingsForm {...props} access={access} />
  25. </div>
  26. </Fragment>
  27. );
  28. }