diff --git a/common/app/redux/fetch-challenges-epic.js b/common/app/redux/fetch-challenges-epic.js index 1205304d7e..5cace6b1f1 100644 --- a/common/app/redux/fetch-challenges-epic.js +++ b/common/app/redux/fetch-challenges-epic.js @@ -72,7 +72,6 @@ export function fetchChallengesForBlockEpic( block: blockName = 'basic-html-and-html5' } = challengeSelector(state); const lang = langSelector(state); - if (fetchAnotherBlock) { const fullBlocks = fullBlocksSelector(state); if (fullBlocks.includes(payload)) { diff --git a/common/app/routes/Challenges/Child-Container.jsx b/common/app/routes/Challenges/Child-Container.jsx index e21b4192b9..deaba3d114 100644 --- a/common/app/routes/Challenges/Child-Container.jsx +++ b/common/app/routes/Challenges/Child-Container.jsx @@ -9,16 +9,17 @@ import { challengeUpdated } from './redux'; import CompletionModal from './Completion-Modal.jsx'; import AppChildContainer from '../../Child-Container.jsx'; import { OverlayLoader } from '../../helperComponents'; +import { fullBlocksSelector } from '../../entities'; +import { paramsSelector } from '../../Router/redux'; const mapStateToProps = createSelector( challengeSelector, - challenge => { - const { description } = challenge; - return { + fullBlocksSelector, + paramsSelector, + (challenge, fullBlocks, { block }) => ({ challenge, - showLoading: !description || description.length === 0 - }; - } + showLoading: !fullBlocks.includes(block) + }) ); const mapDispatchToProps = { challengeUpdated };