Updated user suggestions in reducer to be randomized
• Updated: - user suggestions in reducer to be randomized
This commit is contained in:
parent
40627c6c3f
commit
c1cc0e6355
@ -27,7 +27,8 @@ export default function suggestionsReducer(state = initialState, action) {
|
||||
return state.setIn([action.suggestionType, 'isLoading'], true)
|
||||
case SUGGESTIONS_FETCH_SUCCESS:
|
||||
return state.withMutations((map) => {
|
||||
map.setIn([action.suggestionType, 'items'], fromJS(action.accounts.map(x => x.id)))
|
||||
const items = fromJS(action.accounts.map(x => x.id)).sortBy(Math.random)
|
||||
map.setIn([action.suggestionType, 'items'], items)
|
||||
map.setIn([action.suggestionType, 'isLoading'], false)
|
||||
})
|
||||
case SUGGESTIONS_FETCH_FAIL:
|
||||
|
Loading…
Reference in New Issue
Block a user