screenRenderingSummaryPage.tsx 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import {Fragment} from 'react';
  2. import * as Layout from 'sentry/components/layouts/thirds';
  3. import {t} from 'sentry/locale';
  4. import {useLocation} from 'sentry/utils/useLocation';
  5. import * as ModuleLayout from 'sentry/views/insights/common/components/moduleLayout';
  6. import {ModulePageProviders} from 'sentry/views/insights/common/components/modulePageProviders';
  7. import {ModuleBodyUpsellHook} from 'sentry/views/insights/common/components/moduleUpsellHookWrapper';
  8. import {
  9. DATA_TYPE,
  10. SUMMARY_PAGE_TITLE,
  11. } from 'sentry/views/insights/mobile/screenRendering/settings';
  12. import {ScreenSummaryContent} from 'sentry/views/insights/mobile/ui/views/screenSummaryPage';
  13. import {MobileHeader} from 'sentry/views/insights/pages/mobile/mobilePageHeader';
  14. import {ModuleName} from 'sentry/views/insights/types';
  15. function ScreenRenderingSummary() {
  16. const location = useLocation();
  17. const {transaction: transactionName} = location.query;
  18. return (
  19. <Fragment>
  20. <MobileHeader
  21. headerTitle={transactionName}
  22. module={ModuleName.SCREEN_RENDERING}
  23. breadcrumbs={[{label: SUMMARY_PAGE_TITLE}]}
  24. />
  25. <ModuleBodyUpsellHook moduleName={ModuleName.SCREEN_RENDERING}>
  26. <Layout.Body>
  27. <Layout.Main fullWidth>
  28. <ModuleLayout.Layout>
  29. <ModuleLayout.Full>
  30. <ScreenSummaryContent />
  31. </ModuleLayout.Full>
  32. </ModuleLayout.Layout>
  33. </Layout.Main>
  34. </Layout.Body>
  35. </ModuleBodyUpsellHook>
  36. </Fragment>
  37. );
  38. }
  39. function PageWithProviders() {
  40. return (
  41. <ModulePageProviders
  42. moduleName={ModuleName.SCREEN_RENDERING}
  43. pageTitle={`${DATA_TYPE} ${t('Summary')}`}
  44. >
  45. <ScreenRenderingSummary />
  46. </ModulePageProviders>
  47. );
  48. }
  49. export default PageWithProviders;