about summary refs log tree commit diff
path: root/app/assets/javascripts/components/reducers/suggestions.jsx
blob: 9d2b7d96a4da9b3c9ce145e2ca8337826b69f380 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { SUGGESTIONS_FETCH_SUCCESS } from '../actions/suggestions';
import Immutable                     from 'immutable';

const initialState = Immutable.List();

export default function suggestions(state = initialState, action) {
  switch(action.type) {
    case SUGGESTIONS_FETCH_SUCCESS:
      return Immutable.List(action.accounts.map(item => item.id));
    default:
      return state;
  }
}