index.tsx 873 B

1234567891011121314151617181920212223242526272829303132333435
  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 {Group} from 'sentry/types';
  6. import useOrganization from 'sentry/utils/useOrganization';
  7. import GroupReplays from './groupReplays';
  8. type Props = {
  9. group: Group;
  10. };
  11. const GroupReplaysContainer = ({group}: Props) => {
  12. const organization = useOrganization();
  13. function renderNoAccess() {
  14. return (
  15. <PageContent>
  16. <Alert type="warning">{t("You don't have access to this feature")}</Alert>
  17. </PageContent>
  18. );
  19. }
  20. return (
  21. <Feature
  22. features={['session-replay']}
  23. organization={organization}
  24. renderDisabled={renderNoAccess}
  25. >
  26. <GroupReplays group={group} />
  27. </Feature>
  28. );
  29. };
  30. export default GroupReplaysContainer;