mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-09 12:00:37 -04:00
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:
@@ -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.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user