mirror of
https://github.com/Unleash/unleash.git
synced 2024-10-18 20:09:08 +02:00
18 lines
434 B
JavaScript
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;
|