From bb3bb9dcb352dfe1ef0c74b3991ab1d8c5237d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20M=C3=A1rquez?= <47191295+gustavomm19@users.noreply.github.com> Date: Fri, 20 Sep 2024 13:40:59 +0000 Subject: [PATCH] fix menu bug --- .../syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx index ce25ce1a9..0f803cb5d 100644 --- a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx +++ b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx @@ -122,7 +122,7 @@ function SyllabusContent() { ? section.filteredModulesByPending : section.filteredModules)); - const currentModuleIndex = filteredCurrentAssignments.findIndex((s) => s?.some((l) => l.slug === lessonSlug)); + const currentModuleIndex = filteredCurrentAssignments.findIndex((s) => s?.some((l) => l.slug === lessonSlug || l.translations?.[language]?.slug === lessonSlug || l.translations?.[language]?.slug === currentAsset?.slug)); const currentModule = sortedAssignments[currentModuleIndex]; @@ -306,8 +306,6 @@ function SyllabusContent() { // Binary base64 decoding ⇢ UTF-8 const markdown = getMarkDownContent(markdownData); setReadme(markdown); - console.log('currData'); - console.log(currData); setCurrentAsset(currData); } })