index.tsx 884 B

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