index.tsx 907 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 {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']}
  16. organization={organization}
  17. renderDisabled={() => (
  18. <FeatureDisabled
  19. alert={PanelAlert}
  20. features={['organization:server-side-sampling']}
  21. featureName={t('Server-side Sampling')}
  22. />
  23. )}
  24. >
  25. <ServerSideSampling project={project} />
  26. </Feature>
  27. );
  28. }