fix(left-sidebar): remove useless components

This commit is contained in:
RadoslavDimchev 2024-04-10 18:02:27 +03:00 committed by Radoslav Dimchev
parent 50d1227496
commit 7a94fefa15
2 changed files with 22 additions and 24 deletions

View File

@ -8,7 +8,7 @@ import {
ActivityCenterIcon,
SettingsIcon,
} from '@status-im/icons'
import { YStack } from 'tamagui'
import { Stack, YStack } from 'tamagui'
import { useSelector } from 'react-redux'
import { Tooltip } from '@status-im/components'
@ -41,14 +41,14 @@ const LeftSidebar = () => {
>
{buttons.map((button: SidebarButton) => (
<Tooltip side="right" content={button.tooltip} key={button.path}>
<div style={{ padding: '3px', cursor: 'pointer' }}>
<Stack>
<LeftSidebarIconButton
iconEl={iconMap[button.path as keyof typeof iconMap]}
isDotOn={button.isDotOn}
isDisabled={button.isDisabled}
path={button.path}
/>
</div>
</Stack>
</Tooltip>
))}
</YStack>

View File

@ -17,28 +17,26 @@ const LeftSidebarIconButton = ({
}: IconButtonWithDotProps) => {
return (
<Link to={path}>
<Stack style={{ position: 'relative', display: 'inline-block' }}>
<IconButton
icon={iconEl}
variant={isDisabled ? 'outline' : 'ghost'}
selected={path === window.location.pathname}
disabled={isDisabled}
<IconButton
icon={iconEl}
variant={isDisabled ? 'outline' : 'ghost'}
selected={path === window.location.pathname}
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>
)
}