From 6df2f49ad5d7b15bfc51a2d6dded9f273de37a4a Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Date: Fri, 22 Aug 2025 15:14:54 +0700 Subject: [PATCH] refactor(client): update super block accordion to dynamically look up intro text (#61908) --- .../components/super-block-accordion.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/client/src/templates/Introduction/components/super-block-accordion.tsx b/client/src/templates/Introduction/components/super-block-accordion.tsx index c04d69ff13b..32362cb9bd7 100644 --- a/client/src/templates/Introduction/components/super-block-accordion.tsx +++ b/client/src/templates/Introduction/components/super-block-accordion.tsx @@ -27,6 +27,7 @@ interface ChapterProps { isExpanded: boolean; totalSteps: number; completedSteps: number; + superBlock: SuperBlocks; } interface ModuleProps { @@ -35,6 +36,7 @@ interface ModuleProps { isExpanded: boolean; totalSteps: number; completedSteps: number; + superBlock: SuperBlocks; } interface Challenge { @@ -100,7 +102,8 @@ const Chapter = ({ isExpanded, comingSoon, totalSteps, - completedSteps + completedSteps, + superBlock }: ChapterProps) => { const { t } = useTranslation(); const isComplete = completedSteps === totalSteps; @@ -116,7 +119,7 @@ const Chapter = ({ className='map-icon' chapter={dashedName as FsdChapters} /> - {t(`intro:full-stack-developer.chapters.${dashedName}`)} + {t(`intro:${superBlock}.chapters.${dashedName}`)}