Move from one challenge to another within a block

This commit is contained in:
Berkeley Martinez
2016-06-10 10:45:29 -07:00
parent 5d4a92bcc6
commit c0015a4050
7 changed files with 30 additions and 16 deletions

View File

@@ -2,7 +2,7 @@ import { Observable } from 'rx';
import { push } from 'react-router-redux';
import { moveToNextChallenge } from './types';
import { getNextChallenge } from '../utils';
import { updateCurrentChallenge } from './actions';
import { resetUi, updateCurrentChallenge } from './actions';
// import { createErrorObservable, makeToast } from '../../../redux/actions';
export default function nextChallengeSaga(actions$, getState) {
@@ -17,7 +17,8 @@ export default function nextChallengeSaga(actions$, getState) {
);
return Observable.of(
updateCurrentChallenge(nextChallenge),
push(`/challenges/${nextChallenge.dashedName}`)
resetUi(),
push(`/challenges/${nextChallenge.block}/${nextChallenge.dashedName}`)
);
});
}