Skip to content

Commit 46689a5

Browse files
committed
ref(layout) use layout.main
1 parent 6b52064 commit 46689a5

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

static/app/components/layouts/thirds.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {useContext, type HTMLAttributes} from 'react';
1+
import {useContext} from 'react';
22
import {css} from '@emotion/react';
33
import styled from '@emotion/styled';
44

@@ -200,7 +200,7 @@ export const Body = styled((props: ContainerProps<'div'> & {noRowGap?: boolean})
200200
}
201201
`;
202202

203-
interface MainProps extends HTMLAttributes<HTMLElement> {
203+
export interface MainProps extends ContainerProps {
204204
children: React.ReactNode;
205205
/**
206206
* Set the width of the main content.

static/app/views/explore/components/viewportConstrainedPage.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import styled from '@emotion/styled';
22

3-
import type {FlexProps} from '@sentry/scraps/layout';
4-
53
import * as Layout from 'sentry/components/layouts/thirds';
64
import {SHORT_VIEWPORT_HEIGHT} from 'sentry/utils/useIsShortViewport';
75

8-
interface ViewportConstrainedPageProps extends FlexProps<'main'> {
6+
interface ViewportConstrainedPageProps extends Layout.MainProps {
97
constrained?: boolean;
108
hideFooter?: boolean;
119
}
@@ -27,11 +25,12 @@ export function ViewportConstrainedPage({
2725
...rest
2826
}: ViewportConstrainedPageProps) {
2927
if (!constrained) {
30-
return <Layout.Page {...rest} />;
28+
return <Layout.Main width="full" {...rest} />;
3129
}
3230

3331
return (
34-
<ConstrainedPage
32+
<ConstrainedMain
33+
width="full"
3534
minHeight="0"
3635
overflow="hidden"
3736
data-hide-footer={hideFooter ? '' : undefined}
@@ -40,7 +39,7 @@ export function ViewportConstrainedPage({
4039
);
4140
}
4241

43-
const ConstrainedPage = styled(Layout.Page)`
42+
const ConstrainedMain = styled(Layout.Main)`
4443
contain: size;
4544
4645
@media (max-height: ${SHORT_VIEWPORT_HEIGHT}px) {

static/app/views/explore/errors/content.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ export default function ErrorsContent() {
2525

2626
return (
2727
<SentryDocumentTitle title={t('Errors')} orgSlug={organization?.slug}>
28-
<Layout.Page>
28+
<Layout.Main width="full">
2929
<ErrorsHeader />
3030
<PageFiltersContainer>
3131
<ExploreBodySearch>
3232
<ErrorsFilterSection />
3333
</ExploreBodySearch>
3434
</PageFiltersContainer>
3535
<ErrorsBody />
36-
</Layout.Page>
36+
</Layout.Main>
3737
</SentryDocumentTitle>
3838
);
3939
}

0 commit comments

Comments
 (0)