diff --git a/src/components/content/courses/layout/CourseSidebar.js b/src/components/content/courses/layout/CourseSidebar.js index 7a6af8e..99fc82e 100644 --- a/src/components/content/courses/layout/CourseSidebar.js +++ b/src/components/content/courses/layout/CourseSidebar.js @@ -91,7 +91,7 @@ const CourseSidebar = ({ /> )} -
+
- {/* Main content area with fixed width */} -
-
- + {/* Main content area with flex layout */} +
+ {/* Main Content */} +
{/* Overview tab content */}
- { toggleToContentTab={() => toggleTab(1)} // Assuming content tab is at index 1 />
- + {/* Content tab content */}
{!isAuthorized ? ( @@ -266,11 +265,11 @@ const Course = () => {
) : ( - @@ -279,68 +278,52 @@ const Course = () => { {/* QA tab content */}
- +
+ + {/* Mobile: Lessons are a tab */} + {isMobileView && ( +
+ a.index - b.index)} + activeIndex={activeIndex} + onLessonSelect={handleLessonSelect} + completedLessons={completedLessons} + isMobileView={isMobileView} + onClose={() => { + setSidebarVisible(false); + toggleTab(getActiveTabIndex()); + }} + sidebarVisible={sidebarVisible} + setSidebarVisible={setSidebarVisible} + hideToggleButton={true} + /> +
+ )}
- {/* Course Sidebar - positioned absolutely on desktop when visible */} - {!isMobileView ? ( -
- -
- ) : ( -
- { - setSidebarVisible(false); - toggleTab(getActiveTabIndex()); - }} - sidebarVisible={sidebarVisible} - setSidebarVisible={setSidebarVisible} - hideToggleButton={true} - /> + {sidebarVisible && ( + a.index - b.index)} + activeIndex={activeIndex} + onLessonSelect={handleLessonSelect} + completedLessons={completedLessons} + isMobileView={isMobileView} + sidebarVisible={sidebarVisible} + setSidebarVisible={setSidebarVisible} + hideToggleButton={true} + /> + )}
)}