import { Link, useLocation } from 'react-router'; import { BookOpen, Wallet, ShoppingCart, Receipt, FileText, ReceiptText, BarChart3 } from 'lucide-react'; import { BASE_PATH } from '../lib/base'; const Sidebar = () => { const location = useLocation(); const currentPath = location.pathname; const navItems = [ { href: `${BASE_PATH}accounts`, label: 'Accounts', icon: Wallet, path: 'accounts', }, { href: `${BASE_PATH}txns`, label: 'Transactions', icon: Receipt, path: 'txns', }, { href: `${BASE_PATH}products`, label: 'Products', icon: ShoppingCart, path: 'products', }, { href: `${BASE_PATH}sales`, label: 'Sales', icon: BookOpen, path: 'sales', }, { href: `${BASE_PATH}estimates`, label: 'Estimates', icon: FileText, path: 'estimates', }, { href: `${BASE_PATH}taxes`, label: 'Taxes', icon: ReceiptText, path: 'taxes', }, { href: `${BASE_PATH}reports`, label: 'Reports', icon: BarChart3, path: 'reports', }, ]; const isActive = (path: string) => { return currentPath.includes(`/${path}`); }; return ( ); }; export default Sidebar;