index.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. import {Fragment} from 'react';
  2. import type {RouteComponentProps} from 'react-router';
  3. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  4. import {t} from 'sentry/locale';
  5. import ConfigStore from 'sentry/stores/configStore';
  6. import {useLegacyStore} from 'sentry/stores/useLegacyStore';
  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. }