diff --git a/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/course.tsx b/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/course.tsx index 672101ea..69a1ddef 100644 --- a/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/course.tsx +++ b/apps/web/app/orgs/[orgslug]/(withmenu)/course/[courseuuid]/course.tsx @@ -10,7 +10,7 @@ import GeneralWrapperStyled from '@components/Objects/StyledElements/Wrappers/Ge import { getCourseThumbnailMediaDirectory, } from '@services/media/media' -import { ArrowRight, Backpack, Check, File, Sparkles, StickyNote, Video, Square, Image as ImageIcon } from 'lucide-react' +import { ArrowRight, Backpack, Check, File, Sparkles, StickyNote, Video, Square, Image as ImageIcon, Layers } from 'lucide-react' import { useOrg } from '@components/Contexts/OrgContext' import { CourseProvider } from '@components/Contexts/CourseContext' import { useMediaQuery } from 'usehooks-ts' @@ -77,8 +77,9 @@ const CourseClient = (props: any) => { if (course?.chapters) { const totalActivities = course.chapters.reduce((sum: number, chapter: any) => sum + (chapter.activities?.length || 0), 0) const defaultExpanded: {[key: string]: boolean} = {} - course.chapters.forEach((chapter: any) => { - defaultExpanded[chapter.chapter_uuid] = totalActivities <= 5 + course.chapters.forEach((chapter: any, idx: number) => { + // Always expand the first chapter + defaultExpanded[chapter.chapter_uuid] = idx === 0 ? true : totalActivities <= 5 }) setExpandedChapters(defaultExpanded) } @@ -342,24 +343,21 @@ const CourseClient = (props: any) => {
- {chapter.activities.length} Activities -
+ {/* Chevron on the far left, vertically centered with the title */} +