fix(client): add instructions to challenge view components (#56341)

This commit is contained in:
Tom
2024-10-02 15:22:07 -05:00
committed by GitHub
parent cbcd56503f
commit 17bb3aeb73
2 changed files with 20 additions and 0 deletions
@@ -197,6 +197,7 @@ class ShowDialogue extends Component<ShowDialogueProps, ShowDialogueState> {
challenge: {
title,
description,
instructions,
superBlock,
block,
fields: { blockName },
@@ -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}
@@ -302,6 +312,7 @@ export const query = graphql`
videoId
title
description
instructions
challengeType
helpCategory
superBlock
@@ -230,6 +230,7 @@ class ShowOdin extends Component<ShowOdinProps, ShowOdinState> {
challenge: {
title,
description,
instructions,
superBlock,
block,
videoId,
@@ -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
@@ -389,6 +397,7 @@ export const query = graphql`
}
title
description
instructions
challengeType
helpCategory
superBlock