diff --git a/src/pages/ProductDetail.tsx b/src/pages/ProductDetail.tsx index ab0ac1d..ea958f4 100644 --- a/src/pages/ProductDetail.tsx +++ b/src/pages/ProductDetail.tsx @@ -140,12 +140,8 @@ export default function ProductDetail() { setExpandedModules(new Set([sorted[0].id])); } - // Expand all lessons with chapters by default - const lessonsWithChapters = sorted - .flatMap(m => m.lessons) - .filter(l => l.chapters && l.chapters.length > 0) - .map(l => l.id); - setExpandedLessonChapters(new Set(lessonsWithChapters)); + // Keep all lesson timelines collapsed by default for cleaner UX + setExpandedLessonChapters(new Set()); } }; @@ -448,7 +444,7 @@ export default function ProductDetail() { open={expandedLessonChapters.has(lesson.id)} onOpenChange={() => toggleLessonChapters(lesson.id)} > - + {lesson.chapters.length} timeline item{lesson.chapters.length > 1 ? 's' : ''}