feat(challenge): Initial build of the challenge service

This commit is contained in:
Stuart Taylor
2018-02-23 12:20:13 +00:00
committed by Stuart Taylor
parent d17c2d33eb
commit a7587ed6f0
14 changed files with 263 additions and 83 deletions

View File

@@ -17,7 +17,8 @@ export default function fetchMapUiEpic(
{ services }
) {
return actions::ofType(
appTypes.appMounted
appTypes.appMounted,
types.fetchMapUi.start
)
.flatMapLatest(() => {
const lang = langSelector(getState());
@@ -34,13 +35,7 @@ export default function fetchMapUiEpic(
),
...res
}))
.map(({ entities, result } = {}) => {
return fetchMapUiComplete(
entities,
result
);
})
.startWith({ type: types.fetchMapUi.start })
.map(fetchMapUiComplete)
.catch(createErrorObservable);
});
}