'use client' import { useState } from 'react' import { Note } from '@/lib/types' import { NoteCard } from './note-card' import { ChevronDown, ChevronUp } from 'lucide-react' interface FavoritesSectionProps { pinnedNotes: Note[] onEdit?: (note: Note, readOnly?: boolean) => void } export function FavoritesSection({ pinnedNotes, onEdit }: FavoritesSectionProps) { const [isCollapsed, setIsCollapsed] = useState(false) // Don't show section if no pinned notes if (pinnedNotes.length === 0) { return null } return (
{/* Collapsible Header */} {/* Collapsible Content */} {!isCollapsed && (
{pinnedNotes.map((note) => ( ))}
)}
) }