import { X } from "lucide-react"; export interface HistoryItem { id: string; url: string; type: "track" | "album" | "playlist" | "artist"; name: string; artist: string; image: string; timestamp: number; } interface FetchHistoryProps { history: HistoryItem[]; onSelect: (item: HistoryItem) => void; onRemove: (id: string) => void; } export function FetchHistory({ history, onSelect, onRemove }: FetchHistoryProps) { if (history.length === 0) return null; const getTypeLabel = (type: string) => { switch (type) { case "track": return "Track"; case "album": return "Album"; case "playlist": return "Playlist"; case "artist": return "Artist"; default: return type; } }; return (
{item.name}
{item.artist}
{getTypeLabel(item.type)}