From 117d91e7c408db96eb1aa7fde5906369eb6fdf28 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar <46242073+abhinavkgrd@users.noreply.github.com> Date: Wed, 3 Apr 2024 06:42:46 +0530 Subject: [PATCH] fix(curriculum): fix english curriculum courses challenge titles (#54144) --- client/src/components/profile/components/time-line.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/profile/components/time-line.tsx b/client/src/components/profile/components/time-line.tsx index d91b92b2fb5..8c164a679d4 100644 --- a/client/src/components/profile/components/time-line.tsx +++ b/client/src/components/profile/components/time-line.tsx @@ -18,6 +18,7 @@ import ExamResultsModal from '../../SolutionViewer/exam-results-modal'; import { openModal } from '../../../templates/Challenges/redux/actions'; import { Link, FullWidthRow } from '../../helpers'; import { SolutionDisplayWidget } from '../../solution-display-widget'; +import { SuperBlocks } from '../../../../../shared/config/superblocks'; import TimelinePagination from './timeline-pagination'; const SolutionViewer = Loadable( @@ -288,9 +289,11 @@ function useIdToNameMap(t: TFunction): Map { } }) => { const blockNameTitle = t(`intro:${superBlock}.blocks.${blockName}.title`); + const shouldAppendBlockNameToTitle = + hasEditableBoundaries || superBlock === SuperBlocks.A2English; idToNameMap.set(id, { challengeTitle: `${ - hasEditableBoundaries ? blockNameTitle + ' - ' : '' + shouldAppendBlockNameToTitle ? blockNameTitle + ' - ' : '' }${title}`, challengePath: slug });