21 lines
477 B
JavaScript
21 lines
477 B
JavaScript
import * as types from "./actionTypes";
|
|
import initialState from "../../redux/reducers/initialState";
|
|
|
|
export default function systemReducer(state = initialState.system, action) {
|
|
switch (action.type) {
|
|
case types.LOAD_SYSTEM_DATETIME_SUCCESS:
|
|
return {
|
|
...state,
|
|
datetime: action.payload
|
|
};
|
|
|
|
case types.LOAD_SYSTEM_VERSION_SUCCESS:
|
|
return {
|
|
...state,
|
|
...action.payload
|
|
};
|
|
default:
|
|
return state;
|
|
}
|
|
}
|