screenRenderingSummaryPage.tsx 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 {MODULE_FEATURE_MAP} from 'sentry/views/insights/settings';
  15. import {ModuleName} from 'sentry/views/insights/types';
  16. function ScreenRenderingSummary() {
  17. const location = useLocation();
  18. const {transaction: transactionName} = location.query;
  19. return (
  20. <Fragment>
  21. <MobileHeader
  22. headerTitle={transactionName}
  23. module={ModuleName.SCREEN_RENDERING}
  24. breadcrumbs={[{label: SUMMARY_PAGE_TITLE}]}
  25. />
  26. <ModuleBodyUpsellHook moduleName={ModuleName.SCREEN_RENDERING}>
  27. <Layout.Body>
  28. <Layout.Main fullWidth>
  29. <ModuleLayout.Layout>
  30. <ModuleLayout.Full>
  31. <ScreenSummaryContent />
  32. </ModuleLayout.Full>
  33. </ModuleLayout.Layout>
  34. </Layout.Main>
  35. </Layout.Body>
  36. </ModuleBodyUpsellHook>
  37. </Fragment>
  38. );
  39. }
  40. function PageWithProviders() {
  41. return (
  42. <ModulePageProviders
  43. moduleName={ModuleName.SCREEN_RENDERING}
  44. pageTitle={`${DATA_TYPE} ${t('Summary')}`}
  45. features={MODULE_FEATURE_MAP[ModuleName.SCREEN_RENDERING]}
  46. >
  47. <ScreenRenderingSummary />
  48. </ModulePageProviders>
  49. );
  50. }
  51. export default PageWithProviders;