Make translated challenge titles searchable

This commit is contained in:
Stuart Taylor
2016-12-11 11:13:57 +00:00
parent 09b62bcbcf
commit a9059eb2c6
3 changed files with 39 additions and 18 deletions

View File

@@ -11,7 +11,8 @@ import {
} from './actions';
import {
createMapUi,
filterComingSoonBetaFromEntities
filterComingSoonBetaFromEntities,
searchableChallengeTitles
} from '../utils';
import {
delayedRedirect,
@@ -69,12 +70,18 @@ export default function fetchChallengesSaga(action$, getState, { services }) {
entities,
isDev
);
const searchNames = searchableChallengeTitles(filteredEntities);
return Observable.of(
fetchChallengesCompleted(
createNameIdMap(filteredEntities),
result
),
initMap(createMapUi(filteredEntities, result)),
initMap(
createMapUi(
filteredEntities,
result,
searchNames
)),
);
})
.catch(createErrorObservable);