index.tsx 836 B

123456789101112131415161718192021222324252627282930
  1. import Feature from 'sentry/components/acl/feature';
  2. import Alert from 'sentry/components/alert';
  3. import {t} from 'sentry/locale';
  4. import {PageContent} from 'sentry/styles/organization';
  5. import useOrganization from 'sentry/utils/useOrganization';
  6. import GroupReplays from './groupReplays';
  7. const GroupReplaysContainer = (props: React.ComponentProps<typeof GroupReplays>) => {
  8. const organization = useOrganization();
  9. function renderNoAccess() {
  10. return (
  11. <PageContent>
  12. <Alert type="warning">{t("You don't have access to this feature")}</Alert>
  13. </PageContent>
  14. );
  15. }
  16. return (
  17. <Feature
  18. features={['session-replay-ui']}
  19. organization={organization}
  20. renderDisabled={renderNoAccess}
  21. >
  22. <GroupReplays {...props} />
  23. </Feature>
  24. );
  25. };
  26. export default GroupReplaysContainer;