domainOverviewPageProviders.tsx 1.0 KB

12345678910111213141516171819202122
  1. import NoProjectMessage from 'sentry/components/noProjectMessage';
  2. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  3. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  4. import {MEPSettingProvider} from 'sentry/utils/performance/contexts/metricsEnhancedSetting';
  5. import {useLocation} from 'sentry/utils/useLocation';
  6. import useOrganization from 'sentry/utils/useOrganization';
  7. import {OVERVIEW_PAGE_TITLE} from 'sentry/views/insights/pages/settings';
  8. export function DomainOverviewPageProviders({children}: {children: React.ReactNode}) {
  9. const organization = useOrganization();
  10. const location = useLocation();
  11. return (
  12. <NoProjectMessage organization={organization}>
  13. <PageFiltersContainer>
  14. <SentryDocumentTitle title={OVERVIEW_PAGE_TITLE} orgSlug={organization.slug}>
  15. <MEPSettingProvider location={location}>{children}</MEPSettingProvider>
  16. </SentryDocumentTitle>
  17. </PageFiltersContainer>
  18. </NoProjectMessage>
  19. );
  20. }