// src/components/Sidebar.tsx import React, { useState } from 'react'; import { useNavigate, useLocation } from 'react-router-dom'; import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline'; import SidebarAreas from './components/Sidebar/SidebarAreas'; import SidebarFooter from './components/Sidebar/SidebarFooter'; import SidebarHeader from './components/Sidebar/SidebarHeader'; import SidebarNav from './components/Sidebar/SidebarNav'; import SidebarProjects from './components/Sidebar/SidebarProjects'; import SidebarTags from './components/Sidebar/SidebarTags'; import SidebarNotes from './components/Sidebar/SidebarNotes'; import { Note } from './entities/Note'; import { Area } from './entities/Area'; import { Tag } from './entities/Tag'; interface SidebarProps { currentUser: { email: string }; isDarkMode: boolean; toggleDarkMode: () => void; openProjectModal: () => void; openNoteModal: (note: Note | null) => void; openAreaModal: (area: Area | null) => void; openTagModal: (tag: Tag | null) => void; notes: Note[]; areas: Area[]; tags: Tag[]; } const Sidebar: React.FC = ({ currentUser, isDarkMode, toggleDarkMode, openProjectModal, openNoteModal, openAreaModal, openTagModal, notes, areas, tags, }) => { const [isSidebarOpen, setIsSidebarOpen] = useState(false); const [isDropdownOpen, setIsDropdownOpen] = useState(false); const navigate = useNavigate(); const location = useLocation(); const handleNavClick = (path: string, title: string, icon: string) => { navigate(path, { state: { title, icon } }); setIsSidebarOpen(false); }; const toggleDropdown = () => { setIsDropdownOpen(!isDropdownOpen); }; return ( <>
); }; export default Sidebar;