/** * Stats dashboard showing job counts by status. */ import React from 'react'; import type { JobStatus } from '../../shared/types'; interface StatsProps { stats: Record; } const statConfig: Array<{ key: JobStatus; label: string; emoji: string; }> = [ { key: 'discovered', label: 'Discovered', emoji: '🔍' }, { key: 'processing', label: 'Processing', emoji: '⚙️' }, { key: 'ready', label: 'Ready', emoji: '✨' }, { key: 'applied', label: 'Applied', emoji: '✅' }, { key: 'rejected', label: 'Rejected', emoji: '❌' }, { key: 'expired', label: 'Expired', emoji: '⏰' }, ]; export const Stats: React.FC = ({ stats }) => { const total = Object.values(stats).reduce((a, b) => a + b, 0); return (

Overview

{total} total jobs
{statConfig.map(({ key, label, emoji }) => (
{stats[key] || 0}
{emoji} {label}
))}
); };