From 602b0cb9c34f9e82735c8de322be846dd8aa5bd2 Mon Sep 17 00:00:00 2001 From: lumi-tip Date: Mon, 2 Dec 2024 19:07:37 -0400 Subject: [PATCH 01/24] adding new state in the modal for subtasks --- public/locales/en/common.json | 1 + public/locales/en/syllabus.json | 1 + public/locales/es/common.json | 1 + public/locales/es/syllabus.json | 1 + src/common/components/PopoverTaskHandler.jsx | 12 ++++++- .../moduleMap/ButtonHandlerByTaskStatus.jsx | 36 ++++++++++++++++++- .../[lesson]/[lessonSlug]/index.jsx | 36 +++++++++++++++++-- 7 files changed, 83 insertions(+), 5 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 5bc6668b9..7bd14eaa3 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -144,6 +144,7 @@ "see-instructions": "See instructions", "taskStatus": { "project-approved": "Project approved", + "pending-subtasks": "Take me there", "update-project-delivery": "Update project delivery", "send-project": "Send project", "mark-as-done": "Mark as done", diff --git a/public/locales/en/syllabus.json b/public/locales/en/syllabus.json index adcbdc4a7..e542ed1b0 100644 --- a/public/locales/en/syllabus.json +++ b/public/locales/en/syllabus.json @@ -36,6 +36,7 @@ "no-content-found": "No content found", "no-content-found-description": ">Unfortunately, the content you are looking for is not available at the specified path. We are constantly working on improvements and appreciate your understanding. If you need assistance or have additional questions, please do not hesitate to contact us. We are committed to providing you with the best service. Thank you for your patience and understanding.", "previous-page": "Previous", + "wait-a-sec": "Hey, wait a second!", "ask-to-done": "Would you like to mark this \"{{taskType}}\" as done before moving on?", "mark-later": "Mark as done later", "blank-page": "This content cannot be visualized inside of 4Geeks.com, please Click here to open it on a new window", diff --git a/public/locales/es/common.json b/public/locales/es/common.json index afa189727..8e4d55b4c 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -141,6 +141,7 @@ "see-instructions": "Ver instrucciones", "taskStatus": { "project-approved": "Proyecto aprobado", + "pending-subtasks": "Llévame allí", "update-project-delivery": "Actualizar entrega de proyecto", "send-project": "Enviar proyecto", "mark-as-done": "Marcar como hecho", diff --git a/public/locales/es/syllabus.json b/public/locales/es/syllabus.json index 95e689063..83bf06667 100644 --- a/public/locales/es/syllabus.json +++ b/public/locales/es/syllabus.json @@ -36,6 +36,7 @@ "no-content-found": "No se encontró contenido", "no-content-found-description": ">Lamentablemente, el contenido que buscas no está disponible en la ruta especificada. Estamos trabajando en mejoras continuas y valoramos tu comprensión. Si necesitas asistencia o tienes preguntas adicionales, no dudes en comunicarte con nosotros. Estamos comprometidos a brindarte el mejor servicio. Gracias por tu paciencia y comprensión.", "previous-page": "Anterior", + "wait-a-sec": "Hey, espera un segundo!", "ask-to-done": "¿Te gustaría marcar este \"{{taskType}}\" como completado antes de continuar?", "mark-later": "Marcar luego", "blank-page": "Este contenido no se puede visualizar dentro de 4Geeks.com, please Haga clic aquí para abrirlo en una nueva ventana", diff --git a/src/common/components/PopoverTaskHandler.jsx b/src/common/components/PopoverTaskHandler.jsx index 980f14637..a04ae6f04 100644 --- a/src/common/components/PopoverTaskHandler.jsx +++ b/src/common/components/PopoverTaskHandler.jsx @@ -15,7 +15,7 @@ import useStyle from '../hooks/useStyle'; import useCohortHandler from '../hooks/useCohortHandler'; import { formatBytes } from '../../utils'; -export function textByTaskStatus(currentTask, isGuidedExperience) { +export function textByTaskStatus(currentTask, isGuidedExperience, hasPendingSubtask) { const { t } = useTranslation('dashboard'); const { hexColor } = useStyle(); const taskIsApproved = currentTask?.revision_status === 'APPROVED'; @@ -52,6 +52,16 @@ export function textByTaskStatus(currentTask, isGuidedExperience) { text: t('common:taskStatus.update-project-delivery'), }; } + if (currentTask.task_status === 'PENDING' && hasPendingSubtask) { + return { + icon: { + icon: isGuidedExperience ? 'send-2' : 'longArrowRight', + color: isGuidedExperience ? hexColor.blueDefault : 'white', + width: '20px', + }, + text: t('common:taskStatus.pending-subtasks'), + }; + } return { icon: { icon: isGuidedExperience ? 'send-2' : 'longArrowRight', diff --git a/src/js_modules/moduleMap/ButtonHandlerByTaskStatus.jsx b/src/js_modules/moduleMap/ButtonHandlerByTaskStatus.jsx index 07a5ea6a6..df69bf4bb 100644 --- a/src/js_modules/moduleMap/ButtonHandlerByTaskStatus.jsx +++ b/src/js_modules/moduleMap/ButtonHandlerByTaskStatus.jsx @@ -11,6 +11,7 @@ import PopoverTaskHandler, { IconByTaskStatus, textByTaskStatus } from '../../co export function ButtonHandlerByTaskStatus({ onlyPopoverDialog, currentTask, sendProject, changeStatusAssignment, toggleSettings, closeSettings, settingsOpen, allowText, onClickHandler, currentAssetData, fileData, handleOpen, isGuidedExperience, + hasPendingSubtasks, togglePendingSubtasks, }) { const { hexColor } = useStyle(); const [isReviewModalOpen, setIsReviewModalOpen] = useState(false); @@ -52,7 +53,7 @@ export function ButtonHandlerByTaskStatus({ } }; - const textAndIcon = textByTaskStatus(currentTask); + const textAndIcon = textByTaskStatus(currentTask, isGuidedExperience, hasPendingSubtasks); // PRROJECT CASE if (currentTask && currentTask.task_type === 'PROJECT' && currentTask.task_status) { @@ -123,6 +124,35 @@ export function ButtonHandlerByTaskStatus({ ); } + if (hasPendingSubtasks && !taskIsApprovedOrRejected && currentTask.task_status === 'PENDING') { + return ( + + ); + } return ( { }, handleOpen: () => { }, + togglePendingSubtasks: () => { }, onlyPopoverDialog: false, isGuidedExperience: false, + hasPendingSubtasks: undefined, }; diff --git a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx index 4bf83ee08..e86cd86ee 100644 --- a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx +++ b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx @@ -42,6 +42,7 @@ import useSession from '../../../../../common/hooks/useSession'; import { log } from '../../../../../utils/logging'; import completions from './completion-jobs.json'; import { generateUserContext } from '../../../../../utils/rigobotContext'; +import SubTasks from '../../../../../common/components/MarkDownParser/SubTasks'; function SyllabusContent() { const { t, lang } = useTranslation('syllabus'); @@ -64,6 +65,7 @@ function SyllabusContent() { prevModule, setPrevModule, setSubTasks, + subTasks, } = useModuleHandler(); const { setUserSession } = useSession(); const mainContainer = useRef(null); @@ -104,6 +106,9 @@ function SyllabusContent() { const { featuredLight, fontColor, borderColor, featuredCard, backgroundColor, hexColor, featuredColor, colorMode } = useStyle(); + const hasSubtasks = subTasks?.length > 0; + const hasPendingSubtasks = hasSubtasks && subTasks.some((subtask) => subtask.status === 'PENDING'); + const professionalRoles = ['TEACHER', 'ASSISTANT', 'REVIEWER']; const accessToken = isWindow ? localStorage.getItem('accessToken') : ''; @@ -753,6 +758,25 @@ function SyllabusContent() { return 'auto'; }; + const handleNavigateToLastPendingSubtask = () => { + const pendingSubtasks = subTasks.filter((task) => task.status === 'PENDING'); + + if (pendingSubtasks.length === 0) { + console.log('No hay subtareas pendientes.'); + return; + } + + const lastPendingSubtask = pendingSubtasks[0]; + const subtaskElement = document.getElementById(lastPendingSubtask.id); + + if (!subtaskElement) { + console.log(`No se encontró un elemento en el DOM con el id ${lastPendingSubtask.id}`); + return; + } + + subtaskElement.scrollIntoView({ behavior: 'smooth', block: 'center' }); + }; + return ( <> @@ -1324,9 +1348,13 @@ function SyllabusContent() { - - {t('ask-to-done', { taskType: assetTypeValues[lesson]?.toLowerCase() })} - + {t('wait-a-sec')} + {!hasPendingSubtasks && ( + + {t('ask-to-done', { taskType: assetTypeValues[lesson]?.toLowerCase() })} + + )} + {hasPendingSubtasks && } ), }; } diff --git a/src/pages/cohort/[cohortSlug]/[slug]/[version]/index.jsx b/src/pages/cohort/[cohortSlug]/[slug]/[version]/index.jsx index ceb9b1a14..496920fb3 100644 --- a/src/pages/cohort/[cohortSlug]/[slug]/[version]/index.jsx +++ b/src/pages/cohort/[cohortSlug]/[slug]/[version]/index.jsx @@ -208,7 +208,7 @@ function Dashboard() { return; } - const expiredCourse = cohortSubscriptions.find((sub) => sub.status === 'EXPIRED'); + const expiredCourse = cohortSubscriptions.find((sub) => sub.status === 'EXPIRED' || sub.status === 'ERROR'); if (expiredCourse) { showToastAndRedirect(currentCohortSlug); return; @@ -282,7 +282,7 @@ function Dashboard() { }); bc.payment({ - status: 'ACTIVE,FREE_TRIAL,FULLY_PAID,CANCELLED,PAYMENT_ISSUE,EXPIRED', + status: 'ACTIVE,FREE_TRIAL,FULLY_PAID,CANCELLED,PAYMENT_ISSUE,EXPIRED,ERROR', }).subscriptions() .then(async ({ data }) => { const currentPlanFinancing = data?.plan_financings?.find((s) => s?.selected_cohort_set?.cohorts.some((cohort) => cohort?.slug === cohortSlug)); diff --git a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx index f8bd18cbe..1149bdab5 100644 --- a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx +++ b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx @@ -274,7 +274,7 @@ function SyllabusContent() { useEffect(() => { bc.payment({ - status: 'ACTIVE,FREE_TRIAL,FULLY_PAID,CANCELLED,PAYMENT_ISSUE,EXPIRED', + status: 'ACTIVE,FREE_TRIAL,FULLY_PAID,CANCELLED,PAYMENT_ISSUE,EXPIRED,ERROR', }).subscriptions() .then(async ({ data }) => { const planFinancings = data?.plan_financings?.length > 0 ? data?.plan_financings : []; @@ -309,7 +309,7 @@ function SyllabusContent() { return; } - const expiredCourse = cohortSubscriptions.find((sub) => sub.status === 'EXPIRED'); + const expiredCourse = cohortSubscriptions.find((sub) => sub.status === 'EXPIRED' || sub.status === 'ERROR'); if (expiredCourse) { showToastAndRedirect(currentCohortSlug); return; From 227befce17dcd23bfc60d71a6b354d644e8016e5 Mon Sep 17 00:00:00 2001 From: lumi-tip Date: Wed, 25 Dec 2024 21:34:42 -0400 Subject: [PATCH 15/24] small refactor --- public/locales/en/common.json | 4 + src/common/services/breathecode.js | 2 +- .../syllabus/ExerciseGuidedExperience.jsx | 1 - .../syllabus/ProjectInstructions.jsx | 11 +- .../[lesson]/[lessonSlug]/index.jsx | 131 +++++++++--------- 5 files changed, 80 insertions(+), 69 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 5bc6668b9..8c4f265b6 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -149,6 +149,10 @@ "mark-as-done": "Mark as done", "mark-as-not-done": "Mark as not done" }, + "external":{ + "title": "This is an external exercise", + "description": "\"{{projectName}}\" is an external exercise you will redirected to a new tab to do it; choose one of the following options to start working on the project:" + }, "learnpack": { "title": "This is a Learnpack interactive exercise", "choose-open": "Choose how to open this project", diff --git a/src/common/services/breathecode.js b/src/common/services/breathecode.js index 86ed1d85e..b3a4d4a02 100644 --- a/src/common/services/breathecode.js +++ b/src/common/services/breathecode.js @@ -322,7 +322,7 @@ const breathecode = { const qs = parseQuerys(query); return { get: () => axios.get(`${url}/asset${qs}`), - getAsset: (slug) => axios.get(`${url}/asset/${slug}`), + getAsset: (slug) => axios.get(`${url}/asset/${slug}${qs}`), getAssetContext: (id) => axios.get(`${url}/asset/${id}/context`), techs: () => axios.get(`${url}/academy/technology${qs}`), techsBySort: () => axios.get(`${url}/technology${qs}`), diff --git a/src/js_modules/syllabus/ExerciseGuidedExperience.jsx b/src/js_modules/syllabus/ExerciseGuidedExperience.jsx index 10bfe700e..a3ac766a6 100644 --- a/src/js_modules/syllabus/ExerciseGuidedExperience.jsx +++ b/src/js_modules/syllabus/ExerciseGuidedExperience.jsx @@ -18,7 +18,6 @@ function ExerciseGuidedExperience({ currentTask, currentAsset, handleStartLearnp const [telemetryReport, setTelemetryReport] = useState([]); const isExerciseStated = !!currentTask?.assignment_telemetry; - console.log(currentTask); useEffect(() => { if (isExerciseStated) { diff --git a/src/js_modules/syllabus/ProjectInstructions.jsx b/src/js_modules/syllabus/ProjectInstructions.jsx index 12c0bf603..0580688a0 100644 --- a/src/js_modules/syllabus/ProjectInstructions.jsx +++ b/src/js_modules/syllabus/ProjectInstructions.jsx @@ -167,6 +167,8 @@ function ProjectInstructions({ currentAsset, variant, handleStartLearnpack }) { const isForOpenLocaly = isInteractive || templateUrl; const learnpackDeployUrl = currentAsset?.learnpack_deploy_url; + const isExternalExercise = currentAsset?.external && currentAsset?.asset_type === 'EXERCISE'; + const startWithLearnpack = learnpackDeployUrl && cohortSession.available_as_saas && !noLearnpackIncluded.includes(currentAsset.slug); if (variant === 'small') { @@ -210,15 +212,18 @@ function ProjectInstructions({ currentAsset, variant, handleStartLearnpack }) { <> - + {!isExternalExercise && } - {t('common:learnpack.title')} + {!isExternalExercise ? t('common:learnpack.title') : t('common:external.title')} diff --git a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx index 55b3b8a7f..b6b74a41d 100644 --- a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx +++ b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx @@ -254,10 +254,16 @@ function SyllabusContent() { }, [currentTask]); useEffect(() => { - const assetSlug = currentAsset?.translations[lang] || currentAsset?.translations?.us || currentAsset?.translations?.en || lessonSlug; + const translations = currentAsset?.translations + ? Object.values(currentAsset.translations) + : []; + if (taskTodo.length > 0) { - setCurrentTask(taskTodo.find((el) => el.task_type === assetTypeValues[lesson] - && (el.associated_slug === assetSlug || currentAsset?.aliases?.includes(el.associated_slug)))); + const foundTask = taskTodo.find((el) => ( + el.task_type === assetTypeValues[lesson] + && (translations.includes(el.associated_slug) || currentAsset?.aliases?.includes(el.associated_slug)) + )); + setCurrentTask(foundTask); } }, [taskTodo, lessonSlug, lesson, currentAsset]); @@ -371,6 +377,7 @@ function SyllabusContent() { setCurrentBlankProps(null); setSubTasks([]); }; + const onClickAssignment = (e, item) => { const link = `/syllabus/${cohortSlug}/${item.type?.toLowerCase()}/${item.slug}`; @@ -387,71 +394,67 @@ function SyllabusContent() { }); }; - console.log(currentAsset); - useEffect(() => { const currTask = sortedAssignments[currentModuleIndex]?.modules?.find((l) => l.slug === lessonSlug); const currentLanguageTaskUrl = currTask?.translations?.[lang === 'en' ? 'us' : lang]?.slug || lessonSlug; - if (currTask?.target === 'blank') { - axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentLanguageTaskUrl}?asset_type=${assetTypeValues[lesson]}`).then(({ data }) => setCurrentAsset(data)); - setCurrentBlankProps(currTask); - } else if (currentBlankProps === null || currentBlankProps?.target !== 'blank') { - axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentLanguageTaskUrl}?asset_type=${assetTypeValues[lesson]}`) - .then(({ data }) => { - const translations = data?.translations; - const exensionName = getExtensionName(data.readme_url); - const isIpynb = exensionName === 'ipynb'; - const currentSlug = translations?.[language] || lessonSlug; - const urlPathname = data.readme_url ? data.readme_url.split('https://github.com')[1] : null; - const pathnameWithoutExtension = urlPathname ? urlPathname.split('.ipynb')[0] : null; - const extension = urlPathname ? urlPathname.split('.').pop() : null; - // const translatedExtension = language === 'us' ? '' : `.${language}`; - const finalPathname = `${pathnameWithoutExtension}.${extension}`; - - setReadmeUrlPathname(finalPathname); - let currentTranslationSlug = data?.lang === language ? data?.slug : data.translations[language]; - if (isIpynb) { - setIpynbHtmlUrl(`${BREATHECODE_HOST}/v1/registry/asset/preview/${currentSlug}?plain=true`); - setCurrentAsset(data); - } else { - setIpynbHtmlUrl(null); - if (currentTranslationSlug === undefined) { - currentTranslationSlug = `${lessonSlug}-${language}`; + bc.lesson({ asset_type: assetTypeValues[lesson] }).getAsset(currentLanguageTaskUrl).then(({ data }) => { + const translations = data?.translations; + const exensionName = getExtensionName(data.readme_url); + const isIpynb = exensionName === 'ipynb'; + const currentSlug = translations?.[language] || lessonSlug; + const urlPathname = data.readme_url ? data.readme_url.split('https://github.com')[1] : null; + const pathnameWithoutExtension = urlPathname ? urlPathname.split('.ipynb')[0] : null; + const extension = urlPathname ? urlPathname.split('.').pop() : null; + const finalPathname = `${pathnameWithoutExtension}.${extension}`; + + if (currTask?.target === 'blank') { + setCurrentAsset(data); + return; + } + + setReadmeUrlPathname(finalPathname); + let currentTranslationSlug = data?.lang === language ? data?.slug : data.translations[language]; + if (isIpynb) { + setIpynbHtmlUrl(`${BREATHECODE_HOST}/v1/registry/asset/preview/${currentSlug}?plain=true`); + setCurrentAsset(data); + } else { + setIpynbHtmlUrl(null); + if (currentTranslationSlug === undefined) { + currentTranslationSlug = `${lessonSlug}-${language}`; + } + Promise.all([ + axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentTranslationSlug}.md`), + axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentTranslationSlug}?asset_type=${assetTypeValues[lesson]}`), + ]) + .then(([respMarkdown, respData]) => { + const currData = respData.data; + const markdownData = respMarkdown.data; + + if (lesson === 'answer') { + setQuizSlug(currentTranslationSlug); + } else { + setQuizSlug(null); } - Promise.all([ - axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentTranslationSlug}.md`), - axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentTranslationSlug}?asset_type=${assetTypeValues[lesson]}`), - ]) - .then(([respMarkdown, respData]) => { - const currData = respData.data; - const markdownData = respMarkdown.data; - - if (lesson === 'answer') { - setQuizSlug(currentTranslationSlug); - } else { - setQuizSlug(null); - } - if (currData !== undefined && typeof markdownData === 'string') { - // Binary base64 decoding ⇢ UTF-8 - const markdown = getMarkDownContent(markdownData); - setReadme(markdown); - setCurrentAsset(currData); - } - }) - .catch(() => { - setReadme({ - content: t('no-traduction-found-description'), - }); - setCurrentAsset({ - ...data, - title: t('no-traduction-found'), - }); - }); - } - }).catch(() => { - EventIfNotFound(); - }); - } + if (currData !== undefined && typeof markdownData === 'string') { + // Binary base64 decoding ⇢ UTF-8 + const markdown = getMarkDownContent(markdownData); + setReadme(markdown); + setCurrentAsset(currData); + } + }) + .catch(() => { + setReadme({ + content: t('no-traduction-found-description'), + }); + setCurrentAsset({ + ...data, + title: t('no-traduction-found'), + }); + }); + } + }).catch(() => { + EventIfNotFound(); + }); return () => { cleanCurrentData(); setUserSession({ From 2ea6a098d9e14e9b22d68b12d5df04c39a315bf9 Mon Sep 17 00:00:00 2001 From: lumi-tip Date: Thu, 26 Dec 2024 14:13:36 -0400 Subject: [PATCH 16/24] adding external traslation in es --- public/locales/es/common.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/locales/es/common.json b/public/locales/es/common.json index e3406d230..18df01a62 100644 --- a/public/locales/es/common.json +++ b/public/locales/es/common.json @@ -146,6 +146,10 @@ "mark-as-done": "Marcar como hecho", "mark-as-not-done": "Marcar como no hecho" }, + "external":{ + "title": "Este es un ejercicio externo", + "description": "\"{{projectName}}\" es un ejercicio externo, seras redireccionado a una nueva pestaña para hacerlo; elige una de las siguientes opciones para comenzar a trabajar en el proyecto:" + }, "learnpack": { "title": "Este es un ejercicio interactivo de Learnpack", "choose-open": "Escoge como quieres abrir este proyecto", From 17756f856d98078fa92428beb1d3ba088d259a63 Mon Sep 17 00:00:00 2001 From: lumi-tip Date: Fri, 27 Dec 2024 00:26:58 -0400 Subject: [PATCH 17/24] :recycle: refactor to avoid useless requests --- .../syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx index b6b74a41d..a1d64dc41 100644 --- a/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx +++ b/src/pages/syllabus/[cohortSlug]/[lesson]/[lessonSlug]/index.jsx @@ -423,7 +423,7 @@ function SyllabusContent() { currentTranslationSlug = `${lessonSlug}-${language}`; } Promise.all([ - axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentTranslationSlug}.md`), + assetTypeValues[lesson] !== 'QUIZ' && axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentTranslationSlug}.md`), axios.get(`${BREATHECODE_HOST}/v1/registry/asset/${currentTranslationSlug}?asset_type=${assetTypeValues[lesson]}`), ]) .then(([respMarkdown, respData]) => { @@ -1009,7 +1009,7 @@ function SyllabusContent() { /> )} - {isQuiz ? ( + {isQuiz && quizSlug ? (