list.tsx 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. <div /> {/* wraps the tabs below the page title */}
  36. <ReplayTabs selected="replays" />
  37. </Layout.Header>
  38. <PageFiltersContainer>
  39. <Layout.Body>
  40. <Layout.Main fullWidth>
  41. <LayoutGap>
  42. <ReplayListPageHeaderHook />
  43. <ListContent />
  44. </LayoutGap>
  45. </Layout.Main>
  46. </Layout.Body>
  47. </PageFiltersContainer>
  48. </SentryDocumentTitle>
  49. );
  50. }
  51. const LayoutGap = styled('div')`
  52. display: grid;
  53. gap: ${space(2)};
  54. `;
  55. export default ReplaysListContainer;