Skip to content

Commit

Permalink
fix(client): use block instead of fields: blockName in graphql query (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
moT01 authored Apr 24, 2024
1 parent 3803757 commit c618a64
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions client/src/templates/Challenges/codeally/show.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps> {
data: {
challengeNode: {
challenge: {
block,
challengeType,
description,
fields: { blockName },
id: challengeId,
instructions,
notes,
Expand All @@ -237,7 +237,7 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps> {
} = this.props;

const blockNameTitle = `${t(
`intro:${superBlock}.blocks.${blockName}.title`
`intro:${superBlock}.blocks.${block}.title`
)}: ${title}`;
const windowTitle = `${blockNameTitle} | freeCodeCamp.org`;

Expand Down Expand Up @@ -397,7 +397,7 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps> {
<Spacer size='medium' />
</Col>
<CompletionModal />
<HelpModal challengeTitle={title} challengeBlock={blockName} />
<HelpModal challengeTitle={title} challengeBlock={block} />
</Row>
</Container>
</LearnLayout>
Expand All @@ -418,11 +418,9 @@ export const query = graphql`
query CodeAllyChallenge($slug: String!) {
challengeNode(challenge: { fields: { slug: { eq: $slug } } }) {
challenge {
block
challengeType
description
fields {
blockName
}
helpCategory
id
instructions
Expand Down

0 comments on commit c618a64

Please sign in to comment.