'use client' import { memo } from 'react' import Link from 'next/link' import { Calendar, Tag, AlertCircle } from 'lucide-react' import ToggleItemButton from './ToggleItemButton' import DeleteItemButton from './DeleteItemButton' interface ItemCardProps { item: { id: string title: string description: string | null completed: boolean priority: string dueDate: Date | null tags: any notes: string | null } listId: string } function ItemCard({ item, listId }: ItemCardProps) { const tags = Array.isArray(item.tags) ? item.tags : [] const isOverdue = item.dueDate && new Date(item.dueDate) < new Date() && !item.completed const priorityColors = { low: 'bg-green-100 text-green-700 border-green-200', medium: 'bg-yellow-100 text-yellow-700 border-yellow-200', high: 'bg-red-100 text-red-700 border-red-200', } const priorityColor = priorityColors[item.priority as keyof typeof priorityColors] || priorityColors.medium return (
{item.description}
)} {/* Metadata */}