import { HistoryItem } from './HistoryItem'; import { HistoryEmptyState } from './HistoryEmptyState'; import type { VideoHistoryItem } from '@/lib/types'; import { keepRenderableHistory } from '@/lib/utils/sync-records'; interface HistoryListProps { history: VideoHistoryItem[]; onRemove: (showIdentifier: string) => void; isPremium?: boolean; } export function HistoryList({ history, onRemove, isPremium = false }: HistoryListProps) { const renderableHistory = keepRenderableHistory(history); return (
{renderableHistory.length === 0 ? ( ) : (
{renderableHistory.map((item) => ( onRemove(item.showIdentifier)} isPremium={isPremium} /> ))}
)}
); }