From 45adc402d2167af67486bbfd467d61eaeff853ab Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Fri, 1 Jul 2016 19:05:50 -0700 Subject: [PATCH] Feature(challenges): Move to coming soon challenges in dev close #9349 --- .../routes/challenges/redux/next-challenge-saga.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/common/app/routes/challenges/redux/next-challenge-saga.js b/common/app/routes/challenges/redux/next-challenge-saga.js index d8008aaa9d..55f04e4b57 100644 --- a/common/app/routes/challenges/redux/next-challenge-saga.js +++ b/common/app/routes/challenges/redux/next-challenge-saga.js @@ -9,7 +9,9 @@ import { getFirstChallengeOfNextSuperBlock } from '../utils'; import { randomVerb } from '../../../utils/get-words'; +import debug from 'debug'; +const isDev = debug.enabled('fcc:*'); const { moveToNextChallenge } = types; export default function nextChallengeSaga(actions$, getState) { @@ -24,11 +26,15 @@ export default function nextChallengeSaga(actions$, getState) { const state = getState(); const { challenge, superBlocks } = state.challengesApp; const { entities } = state; - nextChallenge = getNextChallenge(challenge, entities); + nextChallenge = getNextChallenge(challenge, entities, { isDev }); // block completed. if (!nextChallenge) { // isNewBlock = true; - nextChallenge = getFirstChallengeOfNextBlock(challenge, entities); + nextChallenge = getFirstChallengeOfNextBlock( + challenge, + entities, + { isDev } + ); } // superBlock completed if (!nextChallenge) { @@ -36,7 +42,8 @@ export default function nextChallengeSaga(actions$, getState) { nextChallenge = getFirstChallengeOfNextSuperBlock( challenge, entities, - superBlocks + superBlocks, + { isDev } ); } /* this requires user data not available yet