'use client'; /** * BookComparison (Session 28). * * Presentational book-by-book grid for a single prop with the best line * highlighted. Fed by /api/books/:sport/:player/:stat (or the prop grid * from a parent). Pure render — no fetching here, so it drops cleanly into * a modal or an expanded prop row. */ export interface BookRow { book: string; line?: number | null; over_odds?: number | null; under_odds?: number | null; isBest?: boolean; } export interface BookComparisonProps { player: string; stat: string; line?: number | null; side?: 'over' | 'under'; books: BookRow[]; savings?: number; } function fmt(o?: number | null) { if (o == null) return '—'; return o > 0 ? `+${o}` : `${o}`; } export default function BookComparison({ player, stat, line, side = 'over', books, savings }: BookComparisonProps) { if (!books || books.length === 0) return null; return (