diff --git a/frontend/src/components/ChapterStrip.tsx b/frontend/src/components/ChapterStrip.tsx new file mode 100644 index 0000000..13b504e --- /dev/null +++ b/frontend/src/components/ChapterStrip.tsx @@ -0,0 +1,87 @@ +import type { Chapter } from '../types' +import { + activeChapterIndex, + chapterKindLabel, + chapterLapRange, + chapterStartScrub, +} from '../lib/chapters' +import '../styles/chapters.css' + +interface Props { + chapters: Chapter[] + scrubTime: number | null + tMin: number + tRange: number + tourActive: boolean + tourChapterIndex: number | null + onChapterClick: (index: number, scrub: number) => void + onTourToggle: () => void +} + +export function ChapterStrip({ + chapters, + scrubTime, + tMin, + tRange, + tourActive, + tourChapterIndex, + onChapterClick, + onTourToggle, +}: Props) { + if (chapters.length === 0) { + return ( +
No story chapters for this session.
+