diff --git a/src/components/Sidebar.jsx b/src/components/Sidebar.jsx index 01c5050..24d3d21 100644 --- a/src/components/Sidebar.jsx +++ b/src/components/Sidebar.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import { CircleUserRound, ChevronLeft, ChevronRight, Check, X, Plus } from 'lucide-react'; -import { useSupabaseAuth, useNotes } from '../integrations/supabase'; +import { useSupabaseAuth, useNotes, useTags } from '../integrations/supabase'; import { useNavigate } from 'react-router-dom'; import { DropdownMenu, @@ -20,7 +20,7 @@ import { Button } from "@/components/ui/button"; import { format } from 'date-fns'; import AddTagModal from './AddTagModal'; -const Sidebar = ({ activeFilters, toggleFilter, clearFilters, categories, addNewCategory }) => { +const Sidebar = ({ activeFilters, toggleFilter, clearFilters, addNewCategory }) => { const [isCollapsed, setIsCollapsed] = useState(false); const { session, logout } = useSupabaseAuth(); const navigate = useNavigate(); @@ -28,6 +28,7 @@ const Sidebar = ({ activeFilters, toggleFilter, clearFilters, categories, addNew const [isProfileDialogOpen, setIsProfileDialogOpen] = useState(false); const [isAddTagModalOpen, setIsAddTagModalOpen] = useState(false); const { data: notes, isLoading: notesLoading } = useNotes(); + const { data: tags, isLoading: tagsLoading } = useTags(); useEffect(() => { const handleResize = () => { @@ -91,27 +92,31 @@ const Sidebar = ({ activeFilters, toggleFilter, clearFilters, categories, addNew