lml-main
Version:
This is now a mono repository published into many standalone packages.
17 lines • 559 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Actions = require("../../common/actions");
const initialHttpState = {
errors: [],
offline: false,
};
exports.httpReducer = (state = initialHttpState, action) => {
switch (action.type) {
case Actions.HTTP_FAILURE:
return httpFailure(state, action);
default:
return state;
}
};
const httpFailure = (state, action) => (Object.assign({}, state, { errors: [...state.errors, action.error] }));
//# sourceMappingURL=http.js.map