diff --git a/client/src/templates/Introduction/components/super-block-accordion.tsx b/client/src/templates/Introduction/components/super-block-accordion.tsx index e4eca7ba173..e59818d8d27 100644 --- a/client/src/templates/Introduction/components/super-block-accordion.tsx +++ b/client/src/templates/Introduction/components/super-block-accordion.tsx @@ -281,9 +281,9 @@ export const SuperBlockAccordion = ({ }); const chapterStepIdsSet = new Set(chapterStepIds); - const completedStepsInChapter = completedChallengeIds.filter(id => - chapterStepIdsSet.has(id) - ); + const completedStepsInChapter = new Set( + completedChallengeIds.filter(id => chapterStepIdsSet.has(id)) + ).size; return ( {chapter.modules.map(module => { // show coming soon on production, and all the challenges in dev @@ -321,9 +321,9 @@ export const SuperBlockAccordion = ({ ); const moduleStepIdsSet = new Set(moduleStepIds); - const completedStepsInModule = completedChallengeIds.filter(id => - moduleStepIdsSet.has(id) - ); + const completedStepsInModule = new Set( + completedChallengeIds.filter(id => moduleStepIdsSet.has(id)) + ).size; return ( {module.blocks.map(block => ( // maybe TODO: allow blocks to be "coming soon"