list.tsx 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. const ReplayListPageHeaderHook = HookOrDefault({
  14. hookName: 'component:replay-list-page-header',
  15. defaultComponent: ({children}) => <Fragment>{children}</Fragment>,
  16. });
  17. function ReplaysListContainer() {
  18. useReplayPageview('replay.list-time-spent');
  19. const organization = useOrganization();
  20. return (
  21. <SentryDocumentTitle title={`Session Replay — ${organization.slug}`}>
  22. <Layout.Header>
  23. <Layout.HeaderContent>
  24. <Layout.Title>
  25. {t('Session Replay')}
  26. <PageHeadingQuestionTooltip
  27. title={t(
  28. 'A view of available video-like reproductions of user sessions so you can visualize repro steps to debug issues faster.'
  29. )}
  30. docsUrl="https://docs.sentry.io/product/session-replay/"
  31. />
  32. </Layout.Title>
  33. </Layout.HeaderContent>
  34. </Layout.Header>
  35. <PageFiltersContainer>
  36. <Layout.Body>
  37. <Layout.Main fullWidth>
  38. <LayoutGap>
  39. <ReplayListPageHeaderHook />
  40. <ListContent />
  41. </LayoutGap>
  42. </Layout.Main>
  43. </Layout.Body>
  44. </PageFiltersContainer>
  45. </SentryDocumentTitle>
  46. );
  47. }
  48. const LayoutGap = styled('div')`
  49. display: grid;
  50. gap: ${space(2)};
  51. `;
  52. export default ReplaysListContainer;