Browse Source

fix(ui): Consistent use of Layout on Monitors (#43070)

Evan Purkhiser 2 years ago
parent
commit
d6ac384125
2 changed files with 8 additions and 13 deletions
  1. 1 11
      static/app/views/monitors/index.tsx
  2. 7 2
      static/app/views/monitors/monitors.tsx

+ 1 - 11
static/app/views/monitors/index.tsx

@@ -1,21 +1,11 @@
-import styled from '@emotion/styled';
-
 import Feature from 'sentry/components/acl/feature';
 import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
 import withPageFilters from 'sentry/utils/withPageFilters';
 
-const Body = styled('div')`
-  background-color: ${p => p.theme.background};
-  flex-direction: column;
-  flex: 1;
-`;
-
 const MonitorsContainer: React.FC = ({children}) => {
   return (
     <Feature features={['monitors']} renderDisabled>
-      <PageFiltersContainer>
-        <Body>{children}</Body>
-      </PageFiltersContainer>
+      <PageFiltersContainer>{children}</PageFiltersContainer>
     </Feature>
   );
 };

+ 7 - 2
static/app/views/monitors/monitors.tsx

@@ -19,6 +19,7 @@ import ProjectPageFilter from 'sentry/components/projectPageFilter';
 import SearchBar from 'sentry/components/searchBar';
 import TimeSince from 'sentry/components/timeSince';
 import {t} from 'sentry/locale';
+import {PageContent} from 'sentry/styles/organization';
 import space from 'sentry/styles/space';
 import {Organization} from 'sentry/types';
 import {decodeScalar} from 'sentry/utils/queryString';
@@ -103,7 +104,7 @@ class Monitors extends AsyncView<Props, State> {
     const {organization} = this.props;
 
     return (
-      <Fragment>
+      <StyledPageContent>
         <Layout.Header>
           <Layout.HeaderContent>
             <HeaderTitle>
@@ -177,11 +178,15 @@ class Monitors extends AsyncView<Props, State> {
             )}
           </Layout.Main>
         </Layout.Body>
-      </Fragment>
+      </StyledPageContent>
     );
   }
 }
 
+const StyledPageContent = styled(PageContent)`
+  padding: 0;
+`;
+
 const HeaderTitle = styled(Layout.Title)`
   margin-top: 0;
 `;