'use client' import { FC } from 'react' import { Building4, CodeCircle, DocumentText, Element3, Element4, Home2, UserSquare } from 'iconsax-react' import SideBarItem from './SideBarItem' import { useSharedStore } from './store/sharedStore' import { clx } from '../helpers/utils' import Image from 'next/image' import { usePathname } from 'next/navigation' import Button from '@/components/Button' import Link from 'next/link' import { CONSOLE_URL, LOGIN_URL } from '@/config/const' const SideBar: FC = () => { const { openSidebar, setOpenSidebar, isLogin } = useSharedStore() const pathname = usePathname() const isActive = (name: string) => { if (pathname === '/' && name === 'home') { return true } return pathname.includes(name) } const iconSizeSideBar = 20 return ( <> { openSidebar &&