This commit is contained in:
sianida26 2024-03-29 03:21:57 +07:00
parent f4ddd8461d
commit f21c3bfb12

View File

@ -6,9 +6,7 @@ import {
Group, Group,
ThemeIcon, ThemeIcon,
UnstyledButton, UnstyledButton,
alpha,
rem, rem,
useMantineTheme,
} from "@mantine/core"; } from "@mantine/core";
import { TbChevronRight } from "react-icons/tb"; import { TbChevronRight } from "react-icons/tb";
import * as TbIcons from "react-icons/tb"; import * as TbIcons from "react-icons/tb";
@ -37,8 +35,6 @@ export default function MenuItem({ menu }: Props) {
const pathname = usePathname() const pathname = usePathname()
const theme = useMantineTheme();
const [opened, setOpened] = useState(menu.children?.some(child => areURLsSame(`${dashboardConfig.baseRoute}${child.link}`, pathname)) ?? false); const [opened, setOpened] = useState(menu.children?.some(child => areURLsSame(`${dashboardConfig.baseRoute}${child.link}`, pathname)) ?? false);
const toggleOpenMenu = () => { const toggleOpenMenu = () => {