import { Play } from 'lucide-react' import { formatTime } from '@/lib/format' import { cn } from '@/lib/cn' import type { Chapter } from '@/types/abs' interface Props { chapters: Chapter[] activeStart?: number onJump: (start: number) => void } export function ChapterList({ chapters, activeStart, onJump }: Props) { if (!chapters.length) return null return (
{chapters.map((c) => { const active = activeStart != null && activeStart === c.start return ( ) })}
) }