import { useState } from "react"; // import { useLocation } from "react-router-dom" import { FaCaretDown } from "react-icons/fa"; import Icons from "../../Icons"; import { GeneralLayoutContext } from "../../../context/GeneralLayoutContext"; export default function AsideLinkWithSubLinks({name, icon, to, children, isOpen}) { const {shrinkAside} = GeneralLayoutContext() // const {pathname} = useLocation() // const isMatchedPath = pathname.split('/').includes('') // isMatchedPath.splice(0,1) const [hideSubMenu, setHideSubMenu] = useState(isOpen) return (