pageload.tsx 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import styled from '@emotion/styled';
  2. import FeedbackWidget from 'sentry/components/feedback/widget/feedbackWidget';
  3. import * as Layout from 'sentry/components/layouts/thirds';
  4. import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
  5. import {EnvironmentPageFilter} from 'sentry/components/organizations/environmentPageFilter';
  6. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  7. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  8. import {ProjectPageFilter} from 'sentry/components/organizations/projectPageFilter';
  9. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  10. import {t} from 'sentry/locale';
  11. import {space} from 'sentry/styles/space';
  12. import {
  13. PageErrorAlert,
  14. PageErrorProvider,
  15. } from 'sentry/utils/performance/contexts/pageError';
  16. import useOrganization from 'sentry/utils/useOrganization';
  17. import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector';
  18. import {ScreensView, YAxis} from 'sentry/views/starfish/views/screens';
  19. export default function PageloadModule() {
  20. const organization = useOrganization();
  21. return (
  22. <SentryDocumentTitle title={t('Mobile')} orgSlug={organization.slug}>
  23. <Layout.Page>
  24. <PageErrorProvider>
  25. <Layout.Header>
  26. <Layout.HeaderContent>
  27. <Layout.Title>{t('Mobile')}</Layout.Title>
  28. </Layout.HeaderContent>
  29. </Layout.Header>
  30. <Layout.Body>
  31. <FeedbackWidget />
  32. <Layout.Main fullWidth>
  33. <PageErrorAlert />
  34. <PageFiltersContainer>
  35. <Container>
  36. <PageFilterBar condensed>
  37. <ProjectPageFilter />
  38. <EnvironmentPageFilter />
  39. <DatePageFilter />
  40. </PageFilterBar>
  41. <ReleaseComparisonSelector />
  42. </Container>
  43. <ScreensView yAxes={[YAxis.TTID, YAxis.TTFD]} chartHeight={240} />
  44. </PageFiltersContainer>
  45. </Layout.Main>
  46. </Layout.Body>
  47. </PageErrorProvider>
  48. </Layout.Page>
  49. </SentryDocumentTitle>
  50. );
  51. }
  52. const Container = styled('div')`
  53. display: grid;
  54. grid-template-rows: auto auto auto;
  55. gap: ${space(2)};
  56. margin-bottom: ${space(2)};
  57. @media (min-width: ${p => p.theme.breakpoints.large}) {
  58. grid-template-rows: auto;
  59. grid-template-columns: auto 1fr auto;
  60. }
  61. `;