mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor: simplify sourcing of challenge nodes into gatsby (#63697)
This commit is contained in:
committed by
GitHub
parent
6fe97d3105
commit
ee911d7eac
@@ -17,14 +17,12 @@ function createChallengeNode(
|
||||
};
|
||||
|
||||
if (internal.type === 'ChallengeNode') {
|
||||
const { tests = [], block, dashedName, superBlock } = challenge;
|
||||
const { block, dashedName, superBlock } = challenge;
|
||||
const slug = `/learn/${superBlock}/${block}/${dashedName}`;
|
||||
const blockHashSlug = `/learn/${superBlock}/#${block}`;
|
||||
|
||||
challenge.fields = {
|
||||
slug,
|
||||
blockName: block,
|
||||
tests,
|
||||
blockHashSlug
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user