@@ -10,13 +10,16 @@ import Footer from 'sentry/components/footer';
10
10
import LoadingError from 'sentry/components/loadingError' ;
11
11
import LoadingIndicator from 'sentry/components/loadingIndicator' ;
12
12
import PageOverlay from 'sentry/components/pageOverlay' ;
13
- import { SidebarWrapper } from 'sentry/components/sidebar' ;
13
+ import { SidebarWrapper as LegacySidebarWrapper } from 'sentry/components/sidebar' ;
14
14
import SidebarDropdown from 'sentry/components/sidebar/sidebarDropdown' ;
15
15
import { t , tct } from 'sentry/locale' ;
16
+ import { space } from 'sentry/styles/space' ;
16
17
import type { Organization } from 'sentry/types/organization' ;
17
18
import { useApiQuery , useMutation } from 'sentry/utils/queryClient' ;
18
19
import useApi from 'sentry/utils/useApi' ;
19
20
import { useParams } from 'sentry/utils/useParams' ;
21
+ import { OrgDropdown } from 'sentry/views/nav/orgDropdown' ;
22
+ import { usePrefersStackedNav } from 'sentry/views/nav/prefersStackedNav' ;
20
23
21
24
import { sendUpgradeRequest } from 'getsentry/actionCreators/upsell' ;
22
25
import DeactivatedMember from 'getsentry/components/features/illustrations/deactivatedMember' ;
@@ -36,6 +39,8 @@ function DisabledMemberView(props: Props) {
36
39
const { subscription} = props ;
37
40
const orgSlug = subscription . slug ;
38
41
42
+ const prefersStackedNav = usePrefersStackedNav ( ) ;
43
+
39
44
const {
40
45
data : organization ,
41
46
isPending,
@@ -49,9 +54,11 @@ function DisabledMemberView(props: Props) {
49
54
) ;
50
55
51
56
useEffect ( ( ) => {
52
- // needed to make the left margin work as expected
53
- document . body . classList . add ( 'body-sidebar' ) ;
54
- } , [ ] ) ;
57
+ if ( ! prefersStackedNav ) {
58
+ // needed to make the left margin work as expected
59
+ document . body . classList . add ( 'body-sidebar' ) ;
60
+ }
61
+ } , [ prefersStackedNav ] ) ;
55
62
56
63
useEffect ( ( ) => {
57
64
if ( organization ) {
@@ -123,11 +130,17 @@ function DisabledMemberView(props: Props) {
123
130
) ;
124
131
return (
125
132
< PageContainer >
126
- < MinimalistSidebar collapsed = { false } >
127
- { organization && (
128
- < SidebarDropdown orientation = "left" collapsed = { false } hideOrgLinks />
129
- ) }
130
- </ MinimalistSidebar >
133
+ { prefersStackedNav ? (
134
+ < MinimalistSidebar >
135
+ { organization ? < OrgDropdown hideOrgLinks /> : null }
136
+ </ MinimalistSidebar >
137
+ ) : (
138
+ < MinimalistSidebarLegacy collapsed = { false } >
139
+ { organization && (
140
+ < SidebarDropdown orientation = "left" collapsed = { false } hideOrgLinks />
141
+ ) }
142
+ </ MinimalistSidebarLegacy >
143
+ ) }
131
144
{ organization && (
132
145
< PageOverlay
133
146
background = { DeactivatedMember }
@@ -200,10 +213,20 @@ function DisabledMemberView(props: Props) {
200
213
201
214
export default withSubscription ( DisabledMemberView ) ;
202
215
203
- const MinimalistSidebar = styled ( SidebarWrapper ) `
216
+ const MinimalistSidebarLegacy = styled ( LegacySidebarWrapper ) `
204
217
padding: 12px 19px;
205
218
` ;
206
219
220
+ const MinimalistSidebar = styled ( 'div' ) `
221
+ height: 60px;
222
+ border-bottom: 1px solid
223
+ ${ p => ( p . theme . isChonk ? p . theme . border : p . theme . translucentGray200 ) } ;
224
+ background: ${ p => ( p . theme . isChonk ? p . theme . background : p . theme . surface300 ) } ;
225
+ display: flex;
226
+ align-items: center;
227
+ padding: 0 ${ space ( 2 ) } ;
228
+ ` ;
229
+
207
230
const PageContainer = styled ( 'div' ) `
208
231
display: flex;
209
232
flex-direction: column;
0 commit comments