list.tsx 2.1 KB

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