diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx index e02b623..b7ce512 100644 --- a/frontend/src/components/layout/Sidebar.tsx +++ b/frontend/src/components/layout/Sidebar.tsx @@ -1,33 +1,112 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import clsx from 'clsx'; -import { NavLink } from 'react-router-dom'; +import { NavLink, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useUIStore } from '@/store/uiStore'; -interface NavItem { +interface NavLeaf { + to: string; + labelKey: string; +} + +interface NavTreeItem { + labelKey: string; + icon: React.ReactNode; + children: NavLeaf[]; +} + +interface NavSingleItem { to: string; labelKey: string; icon: React.ReactNode; } const navIcon = (path: string) => ( -
+
leocrm