index.tsx 884 B

1234567891011121314151617181920212223242526272829303132
  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 {DynamicSampling} from './dynamicSampling';
  8. type Props = {
  9. project: Project;
  10. };
  11. export default function DynamicSamplingContainer({project}: Props) {
  12. const organization = useOrganization();
  13. return (
  14. <Feature
  15. features={['dynamic-sampling']}
  16. organization={organization}
  17. renderDisabled={() => (
  18. <FeatureDisabled
  19. alert={PanelAlert}
  20. features={['organizations:dynamic-sampling']}
  21. featureName={t('Dynamic Sampling')}
  22. />
  23. )}
  24. >
  25. <DynamicSampling project={project} />
  26. </Feature>
  27. );
  28. }