diff --git a/client/src/templates/Introduction/components/block-header.tsx b/client/src/templates/Introduction/components/block-header.tsx index 33376be6bb2..3eeb3a37c4f 100644 --- a/client/src/templates/Introduction/components/block-header.tsx +++ b/client/src/templates/Introduction/components/block-header.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { isEmpty } from 'lodash'; +import { Button } from '@freecodecamp/ui'; import type { BlockLabel as BlockLabelType } from '../../../../../shared-dist/config/blocks'; import { ProgressBar } from '../../../components/Progress/progress-bar'; @@ -19,6 +20,8 @@ interface BlockHeaderProps { isExpanded: boolean; percentageCompleted: number; blockIntroArr?: string[]; + accordion?: boolean; + blockUrl?: string; } function BlockHeader({ @@ -31,27 +34,37 @@ function BlockHeader({ isCompleted, isExpanded, percentageCompleted, - blockIntroArr + blockIntroArr, + accordion, + blockUrl }: BlockHeaderProps): JSX.Element { return ( <>

- +

{isExpanded && !isEmpty(blockIntroArr) && ( diff --git a/client/src/templates/Introduction/components/block.tsx b/client/src/templates/Introduction/components/block.tsx index b54ca48dbc7..32e2a24ade5 100644 --- a/client/src/templates/Introduction/components/block.tsx +++ b/client/src/templates/Introduction/components/block.tsx @@ -31,7 +31,6 @@ import { ChallengesWithDialogues } from './challenges'; import BlockLabel from './block-label'; -import BlockIntros from './block-intros'; import BlockHeader from './block-header'; import '../intro.css'; @@ -74,6 +73,7 @@ interface BlockProps { superBlock: SuperBlocks; t: TFunction; toggleBlock: typeof toggleBlock; + accordion?: boolean; } export class Block extends Component { @@ -113,7 +113,8 @@ export class Block extends Component { challenges, isExpanded, superBlock, - t + t, + accordion = false } = this.props; let completedCount = 0; @@ -199,7 +200,6 @@ export class Block extends Component { )} -