list.tsx 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import {Fragment} from 'react';
  2. import styled from '@emotion/styled';
  3. import FeatureBadge from 'sentry/components/badge/featureBadge';
  4. import HookOrDefault from 'sentry/components/hookOrDefault';
  5. import * as Layout from 'sentry/components/layouts/thirds';
  6. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  7. import {PageHeadingQuestionTooltip} from 'sentry/components/pageHeadingQuestionTooltip';
  8. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  9. import {t} from 'sentry/locale';
  10. import {space} from 'sentry/styles/space';
  11. import useReplayPageview from 'sentry/utils/replays/hooks/useReplayPageview';
  12. import useOrganization from 'sentry/utils/useOrganization';
  13. import useAllMobileProj from 'sentry/views/replays/detail/useAllMobileProj';
  14. import ListContent from 'sentry/views/replays/list/listContent';
  15. import ReplayTabs from 'sentry/views/replays/tabs';
  16. const ReplayListPageHeaderHook = HookOrDefault({
  17. hookName: 'component:replay-list-page-header',
  18. defaultComponent: ({children}) => <Fragment>{children}</Fragment>,
  19. });
  20. function ReplaysListContainer() {
  21. useReplayPageview('replay.list-time-spent');
  22. const organization = useOrganization();
  23. const {allMobileProj} = useAllMobileProj();
  24. return (
  25. <SentryDocumentTitle title={`Session Replay — ${organization.slug}`}>
  26. <Layout.Header>
  27. <Layout.HeaderContent>
  28. <Layout.Title>
  29. {t('Session Replay')}
  30. <PageHeadingQuestionTooltip
  31. title={t(
  32. 'A view of available video-like reproductions of user sessions so you can visualize repro steps to debug issues faster.'
  33. )}
  34. docsUrl="https://docs.sentry.io/product/session-replay/"
  35. />
  36. {allMobileProj ? (
  37. <FeatureBadge
  38. type="beta"
  39. title={t(
  40. 'Session Replay for mobile apps is currently in beta. Beta features are still in progress and may have bugs.'
  41. )}
  42. />
  43. ) : null}
  44. </Layout.Title>
  45. </Layout.HeaderContent>
  46. <div /> {/* wraps the tabs below the page title */}
  47. <ReplayTabs selected="replays" />
  48. </Layout.Header>
  49. <PageFiltersContainer>
  50. <Layout.Body>
  51. <Layout.Main fullWidth>
  52. <LayoutGap>
  53. <ReplayListPageHeaderHook />
  54. <ListContent />
  55. </LayoutGap>
  56. </Layout.Main>
  57. </Layout.Body>
  58. </PageFiltersContainer>
  59. </SentryDocumentTitle>
  60. );
  61. }
  62. const LayoutGap = styled('div')`
  63. display: grid;
  64. gap: ${space(2)};
  65. `;
  66. export default ReplaysListContainer;