@@ -15,12 +15,10 @@ import { GuideButton, GuideRouter } from 'src/components/guide';
15
15
import { Metadata } from 'src/components/suite' ;
16
16
import { SuiteBanners } from 'src/components/suite/banners' ;
17
17
import { DiscoveryProgress } from 'src/components/wallet' ;
18
- import { MobileAccountsMenu } from 'src/components/wallet/WalletLayout/AccountsMenu/MobileAccountsMenu' ;
19
18
import { HORIZONTAL_LAYOUT_PADDINGS , MAX_CONTENT_WIDTH } from 'src/constants/suite/layout' ;
20
19
import { useLayoutSize , useSelector } from 'src/hooks/suite' ;
21
20
import { useClearAnchorHighlightOnClick } from 'src/hooks/suite/useClearAnchorHighlightOnClick' ;
22
21
import { useResetScrollOnUrl } from 'src/hooks/suite/useResetScrollOnUrl' ;
23
- import { selectSelectedAccount } from 'src/reducers/wallet/selectedAccountReducer' ;
24
22
import { LayoutContext , LayoutContextPayload } from 'src/support/suite/LayoutContext' ;
25
23
import { ModalContextProvider } from 'src/support/suite/ModalContext' ;
26
24
import {
@@ -29,7 +27,6 @@ import {
29
27
} from 'src/support/suite/ResponsiveContext' ;
30
28
31
29
import { CoinjoinBars } from './CoinjoinBars/CoinjoinBars' ;
32
- import { MobileMenu } from './MobileMenu/MobileMenu' ;
33
30
import { Sidebar } from './Sidebar/Sidebar' ;
34
31
import { useAppShortcuts } from './useAppShortcuts' ;
35
32
import { ModalSwitcher } from '../../modals/ModalSwitcher/ModalSwitcher' ;
@@ -142,7 +139,6 @@ interface SuiteLayoutProps {
142
139
}
143
140
144
141
export const SuiteLayout = ( { children } : SuiteLayoutProps ) => {
145
- const selectedAccount = useSelector ( selectSelectedAccount ) ;
146
142
const sidebarWidthFromRedux = useSelector ( state => state . suite . settings . sidebarWidth ) ;
147
143
148
144
const [ { title, layoutHeader } , setLayoutPayload ] = useState < LayoutContextPayload > ( { } ) ;
@@ -152,15 +148,16 @@ export const SuiteLayout = ({ children }: SuiteLayoutProps) => {
152
148
const { scrollRef } = useResetScrollOnUrl ( ) ;
153
149
useClearAnchorHighlightOnClick ( wrapperRef ) ;
154
150
155
- const isAccountPage = ! ! selectedAccount ;
156
-
157
151
useAppShortcuts ( ) ;
158
152
159
153
return (
160
154
< ElevationContext baseElevation = { - 1 } >
161
155
< Wrapper ref = { wrapperRef } data-testid = "@suite-layout" >
162
156
< PageWrapper >
163
- < ResponsiveContextProvider sidebarWidthFromRedux = { sidebarWidthFromRedux } >
157
+ < ResponsiveContextProvider
158
+ sidebarWidthFromRedux = { sidebarWidthFromRedux }
159
+ isMobileLayout = { isMobileLayout }
160
+ >
164
161
< NewModal . Provider >
165
162
< ModalContextProvider >
166
163
< Metadata title = { title } />
@@ -169,18 +166,14 @@ export const SuiteLayout = ({ children }: SuiteLayoutProps) => {
169
166
170
167
{ isMobileLayout && < CoinjoinBars /> }
171
168
172
- { isMobileLayout && < MobileMenu /> }
173
-
174
169
< DiscoveryProgress />
175
170
176
171
< LayoutContext . Provider value = { setLayoutPayload } >
177
172
< Body data-testid = "@suite-layout/body" >
178
173
< Columns >
179
- { ! isMobileLayout && (
180
- < ElevationDown >
181
- < Sidebar />
182
- </ ElevationDown >
183
- ) }
174
+ < ElevationDown >
175
+ < Sidebar isMobileLayout = { isMobileLayout } />
176
+ </ ElevationDown >
184
177
< MainContent >
185
178
{ ! isMobileLayout && < CoinjoinBars /> }
186
179
< SuiteBanners />
@@ -190,9 +183,6 @@ export const SuiteLayout = ({ children }: SuiteLayoutProps) => {
190
183
id = { SCROLL_WRAPPER_ID }
191
184
>
192
185
< ElevationUp >
193
- { isMobileLayout && isAccountPage && (
194
- < MobileAccountsMenu />
195
- ) }
196
186
{ layoutHeader }
197
187
198
188
< ContentWrapper > { children } </ ContentWrapper >
0 commit comments