1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00

26 lines
496 B
React
Raw Normal View History

2017-05-16 13:34:00 +02:00
import {LOAD_CONFIG_SUCCESS} from './actions'
const initialState = {
routes_columns: {
Gateway: "gateway",
Interface: "interface",
Metric: "metric",
2017-07-04 12:37:16 +02:00
},
prefix_lookup_enabled: false
2017-05-16 13:34:00 +02:00
};
export default function reducer(state = initialState, action) {
switch(action.type) {
case LOAD_CONFIG_SUCCESS:
2017-07-04 12:37:16 +02:00
return {
routes_columns: action.payload.routes_columns,
prefix_lookup_enabled: action.payload.prefix_lookup_enabled
};
2017-05-16 13:34:00 +02:00
}
return state;
}