1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
2018-07-05 10:30:52 +02:00

31 lines
765 B
JavaScript

import {LOAD_CONFIG_SUCCESS} from './actions'
const initialState = {
routes_columns: {},
routes_columns_order: [],
neighbours_columns: {},
neighbours_columns_order: [],
prefix_lookup_enabled: false,
content: {}
};
export default function reducer(state = initialState, action) {
switch(action.type) {
case LOAD_CONFIG_SUCCESS:
return Object.assign({}, state, {
routes_columns: action.payload.routes_columns,
routes_columns_order: action.payload.routes_columns_order,
neighbours_columns: action.payload.neighbours_columns,
neighbours_columns_order: action.payload.neighbours_columns_order,
prefix_lookup_enabled: action.payload.prefix_lookup_enabled
});
}
return state;
}