index.tsx 1004 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import Feature from 'sentry/components/acl/feature';
  2. import FeatureDisabled from 'sentry/components/acl/featureDisabled';
  3. import {t} from 'sentry/locale';
  4. import type {Organization} from 'sentry/types';
  5. import Trace from 'sentry/views/replays/detail/trace/trace';
  6. import type {ReplayRecord} from 'sentry/views/replays/types';
  7. type Props = {
  8. organization: Organization;
  9. replayRecord: undefined | ReplayRecord;
  10. };
  11. const features = ['organizations:performance-view'];
  12. function PerfDisabled() {
  13. return (
  14. <FeatureDisabled
  15. featureName={t('Performance Monitoring')}
  16. features={features}
  17. hideHelpToggle
  18. message={t('Requires performance monitoring.')}
  19. />
  20. );
  21. }
  22. function TraceFeature({organization, replayRecord}: Props) {
  23. return (
  24. <Feature
  25. features={features}
  26. hookName={undefined}
  27. organization={organization}
  28. renderDisabled={PerfDisabled}
  29. >
  30. <Trace replayRecord={replayRecord} />
  31. </Feature>
  32. );
  33. }
  34. export default TraceFeature;