Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/neuron-ui/src/containers/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { Routes } from 'utils/const'

const SidebarAside = styled.nav`
display: flex;
width: 240px;
box-sizing: border-box;
flex-direction: column;
margin: 40px 0 0 0;
padding: 0 32px;
Expand Down Expand Up @@ -44,10 +46,11 @@ const menuItems = [
const Sidebar = () => {
const {
wallet: { name },
settings: { wallets },
} = useNeuronWallet()
const [t] = useTranslation()

return (
return wallets.length ? (
<SidebarAside>
{menuItems.map(menuItem => (
<NavLink
Expand All @@ -65,7 +68,7 @@ const Sidebar = () => {
</NavLink>
))}
</SidebarAside>
)
) : null
}

const Container = (props: any) => createPortal(<Sidebar {...props} />, document.querySelector('aside') as HTMLElement)
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-ui/src/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body {
'sidebar notification notification notification' auto
'sidebar content content content' 1fr
'sidebar content content content' 1fr /
240px 1fr 1fr 340px;
auto 1fr 1fr 340px;
column-gap: $column-gap;

height: 100vh;
Expand Down