import React from 'react'; import { Location } from 'react-router-dom'; import { CalendarDaysIcon, CalendarIcon, ArrowRightCircleIcon, InboxIcon, ClockIcon, PauseCircleIcon, CheckCircleIcon, ListBulletIcon, } from '@heroicons/react/24/solid'; interface SidebarNavProps { handleNavClick: (path: string, title: string, icon: JSX.Element) => void; location: Location; isDarkMode: boolean; } const navLinks = [ { path: '/today', title: 'Today', icon: , query: 'type=today' }, { path: '/tasks?type=upcoming', title: 'Upcoming', icon: , query: 'type=upcoming' }, { path: '/tasks?type=next', title: 'Next Actions', icon: , query: 'type=next' }, { path: '/tasks?type=inbox', title: 'Inbox', icon: , query: 'type=inbox' }, // { path: '/tasks?type=someday', title: 'Someday', icon: , query: 'type=someday' }, // { path: '/tasks?type=waiting', title: 'Waiting for', icon: , query: 'type=waiting' }, { path: '/tasks?status=done', title: 'Completed', icon: , query: 'status=done' }, { path: '/tasks', title: 'All Tasks', icon: }, ]; const SidebarNav: React.FC = ({ handleNavClick, location }) => { const isActive = (path: string, query?: string) => { const isPathMatch = location.pathname === '/tasks'; const isQueryMatch = query ? location.search.includes(query) : location.search === ''; return isPathMatch && isQueryMatch ? 'bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-300'; }; return (
    {navLinks.map((link) => (
  • ))}
); }; export default SidebarNav;