"use client"; import Button from "@/components/Button"; import { CONSOLE_URL, LOGIN_URL } from "@/config/const"; import { Building4, CodeCircle, DocumentText, Element3, Element4, Home2, UserSquare } from "iconsax-react"; import Image from "next/image"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { FC } from "react"; import { clx } from "../helpers/utils"; import SideBarItem from "./SideBarItem"; import { useSharedStore } from "./store/sharedStore"; 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 &&