MCPcopy Create free account
hub / github.com/basir/node-react-ecommerce / orderDeleteReducer

Function orderDeleteReducer

frontend/src/reducers/orderReducers.js:88–104  ·  view source on GitHub ↗
(state = {
  order: {
    orderItems: [],
    shipping: {},
    payment: {}
  }
}, action)

Source from the content-addressed store, hash-verified

86}
87
88function orderDeleteReducer(state = {
89 order: {
90 orderItems: [],
91 shipping: {},
92 payment: {}
93 }
94}, action) {
95 switch (action.type) {
96 case ORDER_DELETE_REQUEST:
97 return { loading: true };
98 case ORDER_DELETE_SUCCESS:
99 return { loading: false, success: true };
100 case ORDER_DELETE_FAIL:
101 return { loading: false, error: action.payload };
102 default: return state;
103 }
104}
105export {
106 orderCreateReducer, orderDetailsReducer,
107 orderPayReducer, myOrderListReducer, orderListReducer, orderDeleteReducer

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected