only show sidebar dot seperator if count > 0

This commit is contained in:
Abhinav 2022-06-20 15:28:50 +05:30
parent 0761f2bdea
commit c44b03a2dd

View file

@ -24,10 +24,12 @@ const ShortcutButton: FC<ButtonProps<'button', IProps>> = ({
<Typography variant="body2" display={'flex'} alignItems="center"> <Typography variant="body2" display={'flex'} alignItems="center">
<Box mr={'12px'}>{icon}</Box> <Box mr={'12px'}>{icon}</Box>
{label} {label}
<Box sx={{ color: 'text.secondary' }}> {count > 0 && (
<DotSeparator /> <Box sx={{ color: 'text.secondary' }}>
{count} <DotSeparator />
</Box> {count}
</Box>
)}
</Typography> </Typography>
</SidebarButton> </SidebarButton>
); );