Browse Source

ref(js): Consistent Layout.* usage (#44214)

Evan Purkhiser 2 years ago
parent
commit
b9f6882070

+ 9 - 9
static/app/views/organizationDetails/body.tsx

@@ -4,7 +4,7 @@ import {Alert} from 'sentry/components/alert';
 import {Button} from 'sentry/components/button';
 import ErrorBoundary from 'sentry/components/errorBoundary';
 import Footer from 'sentry/components/footer';
-import {Body, Main} from 'sentry/components/layouts/thirds';
+import * as Layout from 'sentry/components/layouts/thirds';
 import {t, tct} from 'sentry/locale';
 import AlertStore from 'sentry/stores/alertStore';
 import {Organization} from 'sentry/types';
@@ -18,8 +18,8 @@ type Props = {
 
 function DeletionInProgress({organization}: Props) {
   return (
-    <Body>
-      <Main>
+    <Layout.Body>
+      <Layout.Main>
         <Alert type="warning" showIcon>
           {tct(
             'The [organization] organization is currently in the process of being deleted from Sentry.',
@@ -28,8 +28,8 @@ function DeletionInProgress({organization}: Props) {
             }
           )}
         </Alert>
-      </Main>
-    </Body>
+      </Layout.Main>
+    </Layout.Body>
   );
 }
 
@@ -57,8 +57,8 @@ function DeletionPending({organization}: Props) {
   };
 
   return (
-    <Body>
-      <Main>
+    <Layout.Body>
+      <Layout.Main>
         <h3>{t('Deletion Scheduled')}</h3>
         <p>
           {tct('The [organization] organization is currently scheduled for deletion.', {
@@ -93,8 +93,8 @@ function DeletionPending({organization}: Props) {
             )}
           </small>
         </p>
-      </Main>
-    </Body>
+      </Layout.Main>
+    </Layout.Body>
   );
 }
 

+ 4 - 4
static/app/views/releases/detail/commitsAndFiles/commits.tsx

@@ -3,7 +3,7 @@ import {RouteComponentProps} from 'react-router';
 import {Location} from 'history';
 
 import {CommitRow} from 'sentry/components/commitRow';
-import {Body, Main} from 'sentry/components/layouts/thirds';
+import * as Layout from 'sentry/components/layouts/thirds';
 import LoadingIndicator from 'sentry/components/loadingIndicator';
 import Pagination from 'sentry/components/pagination';
 import {Panel, PanelBody, PanelHeader} from 'sentry/components/panels';
@@ -146,9 +146,9 @@ class Commits extends AsyncView<Props, State> {
 
   renderComponent() {
     return (
-      <Body>
-        <Main fullWidth>{super.renderComponent()}</Main>
-      </Body>
+      <Layout.Body>
+        <Layout.Main fullWidth>{super.renderComponent()}</Layout.Main>
+      </Layout.Body>
     );
   }
 }

+ 4 - 4
static/app/views/releases/detail/commitsAndFiles/filesChanged.tsx

@@ -4,7 +4,7 @@ import styled from '@emotion/styled';
 import {Location} from 'history';
 
 import FileChange from 'sentry/components/fileChange';
-import {Body, Main} from 'sentry/components/layouts/thirds';
+import * as Layout from 'sentry/components/layouts/thirds';
 import LoadingIndicator from 'sentry/components/loadingIndicator';
 import Pagination from 'sentry/components/pagination';
 import {Panel, PanelBody, PanelHeader} from 'sentry/components/panels';
@@ -153,9 +153,9 @@ class FilesChanged extends AsyncView<Props, State> {
 
   renderComponent() {
     return (
-      <Body>
-        <Main fullWidth>{super.renderComponent()}</Main>
-      </Body>
+      <Layout.Body>
+        <Layout.Main fullWidth>{super.renderComponent()}</Layout.Main>
+      </Layout.Body>
     );
   }
 }

+ 7 - 7
static/app/views/releases/detail/overview/index.tsx

@@ -15,7 +15,7 @@ import TransactionsList, {
   DropdownOption,
 } from 'sentry/components/discover/transactionsList';
 import EnvironmentPageFilter from 'sentry/components/environmentPageFilter';
-import {Body, Main, Side} from 'sentry/components/layouts/thirds';
+import * as Layout from 'sentry/components/layouts/thirds';
 import {normalizeDateTimeParams} from 'sentry/components/organizations/pageFilters/parse';
 import {ChangeData} from 'sentry/components/organizations/timeRangeSelector';
 import PageTimeRangeSelector from 'sentry/components/pageTimeRangeSelector';
@@ -459,8 +459,8 @@ class ReleaseOverview extends AsyncView<Props> {
                     const reloading = allReleasesReloading || thisReleaseReloading;
                     const errored = allReleasesErrored || thisReleaseErrored;
                     return (
-                      <Body>
-                        <Main>
+                      <Layout.Body>
+                        <Layout.Main>
                           {isReleaseArchived(release) && (
                             <ReleaseArchivedNotice
                               onRestore={() => this.handleRestore(project, refetchData)}
@@ -565,8 +565,8 @@ class ReleaseOverview extends AsyncView<Props> {
                               />
                             )}
                           </Feature>
-                        </Main>
-                        <Side>
+                        </Layout.Main>
+                        <Layout.Side>
                           <ReleaseStats
                             organization={organization}
                             release={release}
@@ -623,8 +623,8 @@ class ReleaseOverview extends AsyncView<Props> {
                               projectId={project.id}
                             />
                           )}
-                        </Side>
-                      </Body>
+                        </Layout.Side>
+                      </Layout.Body>
                     );
                   }}
                 </SessionsRequest>