import Link from 'next/link' import type { RunSummary } from '@/lib/types/run' type Props = { runs: RunSummary[] } function DecisionBadge({ decision }: { decision: string }) { const lower = decision.toLowerCase() if (lower === 'buy') return {decision} if (lower === 'sell') return {decision} if (lower === 'hold') return {decision} return ( {decision} ) } export default function RunHistoryTable({ runs }: Props) { if (runs.length === 0) { return (
No runs yet. Start a new analysis.
| Ticker | Date | Decision | Created | |
|---|---|---|---|---|
| {run.ticker} | {run.date} |
{run.decision ? (
|
{new Date(run.created_at).toLocaleString()} | (e.currentTarget.style.color = 'var(--accent-light)') } onMouseLeave={(e) => (e.currentTarget.style.color = 'var(--accent)') } > View Report → |