Skip to content

Commit

Permalink
fix(client): add instructions to challenge view components (freeCodeC…
Browse files Browse the repository at this point in the history
  • Loading branch information
moT01 authored Oct 2, 2024
1 parent cbcd565 commit 17bb3ae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions client/src/templates/Challenges/dialogue/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class ShowDialogue extends Component<ShowDialogueProps, ShowDialogueState> {
challenge: {
title,
description,
instructions,
superBlock,
block,
fields: { blockName },
Expand Down Expand Up @@ -255,6 +256,15 @@ class ShowDialogue extends Component<ShowDialogueProps, ShowDialogueState> {

<Col md={8} mdOffset={2} sm={10} smOffset={1} xs={12}>
<Spacer size='medium' />
{instructions && (
<>
<PrismFormatted
className={'line-numbers'}
text={instructions}
/>
<Spacer size='medium' />
</>
)}
<ObserveKeys>
<Assignments
assignments={assignments}
Expand Down Expand Up @@ -302,6 +312,7 @@ export const query = graphql`
videoId
title
description
instructions
challengeType
helpCategory
superBlock
Expand Down
9 changes: 9 additions & 0 deletions client/src/templates/Challenges/odin/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ class ShowOdin extends Component<ShowOdinProps, ShowOdinState> {
challenge: {
title,
description,
instructions,
superBlock,
block,
videoId,
Expand Down Expand Up @@ -310,6 +311,13 @@ class ShowOdin extends Component<ShowOdinProps, ShowOdinState> {
)}

<Col md={8} mdOffset={2} sm={10} smOffset={1} xs={12}>
{instructions && (
<PrismFormatted
className={'line-numbers'}
text={instructions}
/>
)}

<ObserveKeys>
{assignments.length > 0 && (
<Assignments
Expand Down Expand Up @@ -389,6 +397,7 @@ export const query = graphql`
}
title
description
instructions
challengeType
helpCategory
superBlock
Expand Down

0 comments on commit 17bb3ae

Please sign in to comment.