fix(client): use block instead of fields: blockName in graphql query (#54519)

This commit is contained in:
Tom
2024-04-24 11:28:51 -05:00
committed by GitHub
parent 3803757699
commit c618a64bc0

View File

@@ -214,9 +214,9 @@ class ShowCodeAlly extends Component<ShowCodeAllyProps> {
data: {
challengeNode: {
challenge: {
block,
challengeType,
description,
fields: { blockName },
id: challengeId,
instructions,
notes,
@@ -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`;
@@ -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>
@@ -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