You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
480 B
20 lines
480 B
const Immutable = require('immutable');
|
|
|
|
import * as GridActions from '../../actions/board/grid.actions';
|
|
import GridCtrl from '../../controllers/grid.controller.js';
|
|
|
|
const initial = [];
|
|
|
|
const reducer = (state = initial, action) => {
|
|
if (action.type !== GridActions.GRID_ACTION) {
|
|
return state;
|
|
}
|
|
|
|
if (action.action === GridActions.UPDATE) {
|
|
return Immutable.List(GridCtrl.getValues()).toArray();
|
|
}
|
|
|
|
return state;
|
|
};
|
|
|
|
export default reducer;
|
|
|