index.tsx 894 B

1234567891011121314151617181920212223242526272829303132333435
  1. import Feature from 'sentry/components/acl/feature';
  2. import {Alert} from 'sentry/components/alert';
  3. import * as Layout from 'sentry/components/layouts/thirds';
  4. import {t} from 'sentry/locale';
  5. import type {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 = (props: Props) => {
  12. const organization = useOrganization();
  13. function renderNoAccess() {
  14. return (
  15. <Layout.Page withPadding>
  16. <Alert type="warning">{t("You don't have access to this feature")}</Alert>
  17. </Layout.Page>
  18. );
  19. }
  20. return (
  21. <Feature
  22. features={['session-replay-ui']}
  23. organization={organization}
  24. renderDisabled={renderNoAccess}
  25. >
  26. <GroupReplays {...props} />
  27. </Feature>
  28. );
  29. };
  30. export default GroupReplaysContainer;