1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/store/history-store.js
2016-11-10 14:27:06 +01:00

18 lines
434 B
JavaScript

import { List, Map as $Map } from 'immutable';
import { RECEIVE_HISTORY } from './history-actions';
function getInitState () {
return new $Map({ list: new List() });
}
const historyStore = (state = getInitState(), action) => {
switch (action.type) {
case RECEIVE_HISTORY:
return state.set('list', new List(action.value));
default:
return state;
}
};
export default historyStore;