interface HistoryItem { id: string; title: string; time: string; } interface SidebarHistoryProps { items: HistoryItem[]; activeId: string | null; onSelect: (id: string) => void; } export default function SidebarHistory({ items, activeId, onSelect, }: SidebarHistoryProps) { return (
History
{items.map((item, index) => { const active = activeId === item.id; return ( ); })}
); }