index.tsx 805 B

12345678910111213141516171819202122232425262728293031
  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 useOrganization from 'sentry/utils/useOrganization';
  6. import TransactionReplays from './transactionReplays';
  7. function renderNoAccess() {
  8. return (
  9. <Layout.Page withPadding>
  10. <Alert type="warning">{t("You don't have access to this feature")}</Alert>
  11. </Layout.Page>
  12. );
  13. }
  14. function TransactionReplaysContainer() {
  15. const organization = useOrganization();
  16. return (
  17. <Feature
  18. features={['session-replay']}
  19. organization={organization}
  20. renderDisabled={renderNoAccess}
  21. >
  22. <TransactionReplays />
  23. </Feature>
  24. );
  25. }
  26. export default TransactionReplaysContainer;