'use client' import * as React from 'react' import { Trash2, ExternalLink, Calendar, Tag, Folder } from 'lucide-react' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { usePersonalListStore } from '@/lib/personal-list-store' import { cn } from '@/lib/utils' export function PersonalListItems() { const { items, removeItem } = usePersonalListStore() if (items.length === 0) { return (

No items yet

Start building your awesome list by clicking
"Push to my list"{' '} on any repository

) } // Group items by category const categorized = items.reduce((acc, item) => { const category = item.category || 'Uncategorized' if (!acc[category]) { acc[category] = [] } acc[category].push(item) return acc }, {} as Record) return (
{Object.entries(categorized).map(([category, categoryItems]) => (

{category} {categoryItems.length}

{categoryItems.map((item) => ( {item.title}

{item.description}

{item.repository && (
{item.repository}
)}
{new Date(item.addedAt).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric', })}
{item.tags && item.tags.length > 0 && ( <>
{item.tags.map((tag) => ( {tag} ))}
)}
))}
))}
) }