mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-03-01 19:40:44 +00:00
fix(left-sidebar): remove useless components
This commit is contained in:
parent
50d1227496
commit
7a94fefa15
@ -8,7 +8,7 @@ import {
|
|||||||
ActivityCenterIcon,
|
ActivityCenterIcon,
|
||||||
SettingsIcon,
|
SettingsIcon,
|
||||||
} from '@status-im/icons'
|
} from '@status-im/icons'
|
||||||
import { YStack } from 'tamagui'
|
import { Stack, YStack } from 'tamagui'
|
||||||
import { useSelector } from 'react-redux'
|
import { useSelector } from 'react-redux'
|
||||||
import { Tooltip } from '@status-im/components'
|
import { Tooltip } from '@status-im/components'
|
||||||
|
|
||||||
@ -41,14 +41,14 @@ const LeftSidebar = () => {
|
|||||||
>
|
>
|
||||||
{buttons.map((button: SidebarButton) => (
|
{buttons.map((button: SidebarButton) => (
|
||||||
<Tooltip side="right" content={button.tooltip} key={button.path}>
|
<Tooltip side="right" content={button.tooltip} key={button.path}>
|
||||||
<div style={{ padding: '3px', cursor: 'pointer' }}>
|
<Stack>
|
||||||
<LeftSidebarIconButton
|
<LeftSidebarIconButton
|
||||||
iconEl={iconMap[button.path as keyof typeof iconMap]}
|
iconEl={iconMap[button.path as keyof typeof iconMap]}
|
||||||
isDotOn={button.isDotOn}
|
isDotOn={button.isDotOn}
|
||||||
isDisabled={button.isDisabled}
|
isDisabled={button.isDisabled}
|
||||||
path={button.path}
|
path={button.path}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Stack>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
))}
|
))}
|
||||||
</YStack>
|
</YStack>
|
||||||
|
@ -17,28 +17,26 @@ const LeftSidebarIconButton = ({
|
|||||||
}: IconButtonWithDotProps) => {
|
}: IconButtonWithDotProps) => {
|
||||||
return (
|
return (
|
||||||
<Link to={path}>
|
<Link to={path}>
|
||||||
<Stack style={{ position: 'relative', display: 'inline-block' }}>
|
<IconButton
|
||||||
<IconButton
|
icon={iconEl}
|
||||||
icon={iconEl}
|
variant={isDisabled ? 'outline' : 'ghost'}
|
||||||
variant={isDisabled ? 'outline' : 'ghost'}
|
selected={path === window.location.pathname}
|
||||||
selected={path === window.location.pathname}
|
disabled={isDisabled}
|
||||||
disabled={isDisabled}
|
/>
|
||||||
|
{isDotOn && (
|
||||||
|
<Stack
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
right: 7,
|
||||||
|
top: 5,
|
||||||
|
width: '9px',
|
||||||
|
height: '9px',
|
||||||
|
borderRadius: '50%',
|
||||||
|
backgroundColor: '#1992D7',
|
||||||
|
border: '1.5px solid #fff',
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
{isDotOn && (
|
)}
|
||||||
<Stack
|
|
||||||
style={{
|
|
||||||
position: 'absolute',
|
|
||||||
right: 7,
|
|
||||||
top: 5,
|
|
||||||
width: '9px',
|
|
||||||
height: '9px',
|
|
||||||
borderRadius: '50%',
|
|
||||||
backgroundColor: '#1992D7',
|
|
||||||
border: '1.5px solid #fff',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user