File size: 710 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import { Box } from '@chakra-ui/react';
import { nanoid } from '@reduxjs/toolkit';
import React from 'react';
import SideMenuItem from '../../utils/SideMenuItem';
const Left = ({ allTags, handleClickTag }) => {
return (
<Box w='230px' display={{ base: 'none', md: 'block' }}>
{allTags.map((item) => (
<SideMenuItem
isActive={item.active}
key={nanoid()}
title={
item.tagName === 'All tags'
? item.tagName
: `#${item.tagName}`
}
onClick={() => handleClickTag(item.tagName)}
/>
))}
</Box>
);
};
export default Left;
|