index.tsx 1019 B

1234567891011121314151617181920212223242526272829303132333435
  1. import Feature from 'sentry/components/acl/feature';
  2. import FeatureDisabled from 'sentry/components/acl/featureDisabled';
  3. import {PanelAlert} from 'sentry/components/panels';
  4. import {t} from 'sentry/locale';
  5. import {Project} from 'sentry/types';
  6. import useOrganization from 'sentry/utils/useOrganization';
  7. import {ServerSideSampling} from './serverSideSampling';
  8. type Props = {
  9. project: Project;
  10. };
  11. export default function ServerSideSamplingContainer({project}: Props) {
  12. const organization = useOrganization();
  13. return (
  14. <Feature
  15. features={['server-side-sampling', 'dynamic-sampling-deprecated']}
  16. organization={organization}
  17. renderDisabled={() => (
  18. <FeatureDisabled
  19. alert={PanelAlert}
  20. features={[
  21. 'organization:server-side-sampling',
  22. 'organization:dynamic-sampling-deprecated',
  23. ]}
  24. featureName={t('Server-Side Sampling')}
  25. />
  26. )}
  27. >
  28. <ServerSideSampling project={project} />
  29. </Feature>
  30. );
  31. }