screenRenderingSummaryPage.tsx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 {
  8. DATA_TYPE,
  9. SUMMARY_PAGE_TITLE,
  10. } from 'sentry/views/insights/mobile/screenRendering/settings';
  11. import {ScreenSummaryContent} from 'sentry/views/insights/mobile/ui/views/screenSummaryPage';
  12. import {MobileHeader} from 'sentry/views/insights/pages/mobile/mobilePageHeader';
  13. import {MODULE_FEATURE_MAP} from 'sentry/views/insights/settings';
  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. <Layout.Body>
  26. <Layout.Main fullWidth>
  27. <ModuleLayout.Layout>
  28. <ModuleLayout.Full>
  29. <ScreenSummaryContent />
  30. </ModuleLayout.Full>
  31. </ModuleLayout.Layout>
  32. </Layout.Main>
  33. </Layout.Body>
  34. </Fragment>
  35. );
  36. }
  37. function PageWithProviders() {
  38. return (
  39. <ModulePageProviders
  40. moduleName={ModuleName.SCREEN_RENDERING}
  41. pageTitle={`${DATA_TYPE} ${t('Summary')}`}
  42. features={MODULE_FEATURE_MAP[ModuleName.SCREEN_RENDERING]}
  43. >
  44. <ScreenRenderingSummary />
  45. </ModulePageProviders>
  46. );
  47. }
  48. export default PageWithProviders;