fix(learn): path to Intros
This commit is contained in:
@ -49,7 +49,7 @@ const getTemplateComponent = challengeType => views[viewTypes[challengeType]];
|
|||||||
|
|
||||||
const getIntroIfRequired = (node, index, nodeArray) => {
|
const getIntroIfRequired = (node, index, nodeArray) => {
|
||||||
const next = nodeArray[index + 1];
|
const next = nodeArray[index + 1];
|
||||||
const isEndOfBlock = next && next.node.challengeOrder === 1;
|
const isEndOfBlock = next && next.node.challengeOrder === 0;
|
||||||
let nextSuperBlock = '';
|
let nextSuperBlock = '';
|
||||||
let nextBlock = '';
|
let nextBlock = '';
|
||||||
if (next) {
|
if (next) {
|
||||||
@ -58,7 +58,7 @@ const getIntroIfRequired = (node, index, nodeArray) => {
|
|||||||
nextBlock = block;
|
nextBlock = block;
|
||||||
}
|
}
|
||||||
return isEndOfBlock
|
return isEndOfBlock
|
||||||
? `/${dasherize(nextSuperBlock)}/${dasherize(nextBlock)}`
|
? `/learn/${dasherize(nextSuperBlock)}/${dasherize(nextBlock)}`
|
||||||
: '';
|
: '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user