import { LayoutGrid } from 'lucide-react'; import { Badge } from './ui/Badge'; import type { NotebookSummary } from '../lib/types'; const engineVariant: Record = { ngspice: 'blue', ltspice: 'amber', }; function formatDate(iso: string): string { try { return new Date(iso).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric', timeZone: 'UTC', }); } catch { return iso; } } interface NotebookCardProps { notebook: NotebookSummary; } export function NotebookCard({ notebook }: NotebookCardProps) { const { id, title, engine, tags, cell_count, modified } = notebook; return (

{title}

{engine}
{cell_count} cell{cell_count !== 1 ? 's' : ''} {formatDate(modified)}
{tags.length > 0 && (
{tags.map((tag) => ( {tag} ))}
)}
); }