Skip to content

Commit db404fa

Browse files
authored
fix(suite): Hide 'no accounts' in collapsed sidebar (#15714)
1 parent 7ea2e9d commit db404fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/suite/src/components/wallet/WalletLayout/AccountsMenu/AccountsMenu.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { AccountsMenuNotice } from './AccountsMenuNotice';
1818
import { RefreshAfterDiscoveryNeeded } from './RefreshAfterDiscoveryNeeded';
1919
import { ExpandedSidebarOnly } from '../../../suite/layouts/SuiteLayout/Sidebar/ExpandedSidebarOnly';
2020
import { CollapsedSidebarOnly } from '../../../suite/layouts/SuiteLayout/Sidebar/CollapsedSidebarOnly';
21+
import { useIsSidebarCollapsed } from '../../../suite/layouts/SuiteLayout/Sidebar/utils';
2122

2223
const Wrapper = styled.div`
2324
display: flex;
@@ -45,8 +46,11 @@ export const AccountsMenu = () => {
4546
const { discovery } = useDiscovery();
4647
const { scrollElementRef, onScroll, ShadowTop, ShadowBottom, ShadowContainer } =
4748
useScrollShadow();
49+
const isSidebarCollapsed = useIsSidebarCollapsed();
4850

4951
if (!device || !discovery) {
52+
if (isSidebarCollapsed) return <Wrapper />;
53+
5054
return (
5155
<Wrapper>
5256
<AccountsMenuNotice>

0 commit comments

Comments
 (0)