1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-13 14:18:19 +09:00
mastodon/app/assets/javascripts/components/reducers/suggestions.jsx
2016-10-27 21:59:56 +02:00

14 lines
398 B
JavaScript

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;
}
}