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

Function myOrderListReducer

frontend/src/reducers/orderReducers.js:42–54  ·  view source on GitHub ↗
(state = {
  orders: []
}, action)

Source from the content-addressed store, hash-verified

40
41
42function myOrderListReducer(state = {
43 orders: []
44}, action) {
45 switch (action.type) {
46 case MY_ORDER_LIST_REQUEST:
47 return { loading: true };
48 case MY_ORDER_LIST_SUCCESS:
49 return { loading: false, orders: action.payload };
50 case MY_ORDER_LIST_FAIL:
51 return { loading: false, error: action.payload };
52 default: return state;
53 }
54}
55
56function orderListReducer(state = {
57 orders: []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected