import { useState } from 'react'; import { BASE_URL } from '../../lib/api-client'; import { formatDuration, formatRelativeDate, formatNumber, } from '../../lib/formatters'; import type { SessionSummary } from '../../types/stats'; interface SessionRowProps { session: SessionSummary; isExpanded: boolean; detailsId: string; onToggle: () => void; } function CoverThumbnail({ videoId, title }: { videoId: number | null; title: string }) { const [failed, setFailed] = useState(false); const fallbackChar = title.charAt(0) || '?'; if (!videoId || failed) { return (
{fallbackChar}
); } return ( setFailed(true)} /> ); } export function SessionRow({ session, isExpanded, detailsId, onToggle }: SessionRowProps) { return ( ); }