Feat(Curriculum): Implement Chapter Based Layout to A1 Spanish (#62190)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Nielda Karla
2025-09-15 16:39:48 -03:00
committed by GitHub
parent 954117ce5e
commit 75e825d5fa
24 changed files with 608 additions and 39 deletions

View File

@@ -9,8 +9,10 @@ import DropDown from '../../../assets/icons/dropdown';
// from the curriculum
import fullStackCert from '../../../../../curriculum/structure/superblocks/full-stack-developer.json';
import fullStackOpen from '../../../../../curriculum/structure/superblocks/full-stack-open.json';
import a1Spanish from '../../../../../curriculum/structure/superblocks/a1-professional-spanish.json';
import { ChapterIcon } from '../../../assets/chapter-icon';
import { type Chapter } from '../../../../../shared/config/chapters';
import { BlockLayouts, BlockTypes } from '../../../../../shared/config/blocks';
import { FsdChapters } from '../../../../../shared/config/chapters';
import { type Module } from '../../../../../shared/config/modules';
@@ -174,12 +176,16 @@ export const SuperBlockAccordion = ({
chosenBlock,
completedChallengeIds
}: SuperBlockAccordionProps) => {
function getSuperblockStructure(superBlock: SuperBlocks) {
function getSuperblockStructure(superBlock: SuperBlocks): {
chapters: Chapter[];
} {
switch (superBlock) {
case SuperBlocks.FullStackOpen:
return fullStackOpen;
case SuperBlocks.FullStackDeveloper:
return fullStackCert;
case SuperBlocks.A1Spanish:
return a1Spanish;
default:
throw new Error("The SuperBlock structure hasn't been imported.");
}