From f3d667a0ba2ea90df625e3c068720c677ae71c12 Mon Sep 17 00:00:00 2001 From: Austin Kelsay <53542748+AustinKelsay@users.noreply.github.com> Date: Thu, 24 Apr 2025 13:53:24 -0500 Subject: [PATCH] Update src/pages/course/[slug]/index.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/pages/course/[slug]/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/course/[slug]/index.js b/src/pages/course/[slug]/index.js index 9a8257b..a2da7d1 100644 --- a/src/pages/course/[slug]/index.js +++ b/src/pages/course/[slug]/index.js @@ -604,9 +604,12 @@ const Course = () => { activeIndex={activeIndex} onLessonSelect={(index) => { handleLessonSelect(index); - if (isMobileView) { - toggleTab(getTabItems().findIndex(item => item.label === 'Content')); - } +onLessonSelect={(index) => { + handleLessonSelect(index); + if (isMobileView) { + setActiveTab('content'); // Use the tab name directly + } +}} }} completedLessons={completedLessons} isMobileView={isMobileView}