Inital user auth commit

This commit is contained in:
Stuart Taylor
2018-04-11 14:46:46 +01:00
committed by Mrugesh Mohapatra
parent 6dd6b44848
commit c4108aca5d
9 changed files with 333 additions and 40 deletions

View File

@ -69,7 +69,13 @@ exports.createPages = ({ graphql, boundActionCreators }) => {
// Create challenge pages.
result.data.allChallengeNode.edges.forEach((edge, index, thisArray) => {
const { fields: { slug }, required = [], template, challengeType, id } = edge.node;
const {
fields: { slug },
required = [],
template,
challengeType,
id
} = edge.node;
const next = thisArray[index + 1];
const nextChallengePath = next ? next.node.fields.slug : '/';
createPage({