diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index 0d6686e8383..3cfcfeb3498 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -718,6 +718,8 @@ "step": "Step", "steps": "Steps", "steps-for": "Steps for {{blockTitle}}", + "task": "Task", + "dialogues-and-tasks-for": "Dialogues and tasks for {{blockTitle}}", "code-example": "{{codeName}} code example", "opens-new-window": "Opens in new window" }, diff --git a/client/src/templates/Introduction/components/challenges.tsx b/client/src/templates/Introduction/components/challenges.tsx index d7e70250363..b0c1f42e004 100644 --- a/client/src/templates/Introduction/components/challenges.tsx +++ b/client/src/templates/Introduction/components/challenges.tsx @@ -9,6 +9,14 @@ import GreenNotCompleted from '../../../assets/icons/green-not-completed'; import GreenPass from '../../../assets/icons/green-pass'; import { executeGA } from '../../../redux/actions'; import { ChallengeWithCompletedNode } from '../../../redux/prop-types'; +import { SuperBlocks } from '../../../../../shared/config/superblocks'; +import { challengeTypes } from '../../../../../shared/config/challenge-types'; + +const getStepNumber = (dashedName: string) => { + // dashedName should be in the format 'step-1' or 'task-1' + const match = dashedName.match(/-(\d+)/); + return match ? match[1] : ''; +}; const mapDispatchToProps = (dispatch: Dispatch) => bindActionCreators({ executeGA }, dispatch); @@ -23,6 +31,28 @@ interface Challenges { const CheckMark = ({ isCompleted }: { isCompleted: boolean }) => isCompleted ? : ; +const Challenge = ({ + challenge +}: { + challenge: ChallengeWithCompletedNode; +}) => ( + + + + + {challenge.title} + +); + +const Project = ({ challenge }: { challenge: ChallengeWithCompletedNode }) => ( + + {challenge.title} + + + + +); + function Challenges({ challengesWithCompleted, isProjectBlock, @@ -56,40 +86,51 @@ function Challenges({ )}