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

Function orderListReducer

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

Source from the content-addressed store, hash-verified

54}
55
56function orderListReducer(state = {
57 orders: []
58}, action) {
59 switch (action.type) {
60 case ORDER_LIST_REQUEST:
61 return { loading: true };
62 case ORDER_LIST_SUCCESS:
63 return { loading: false, orders: action.payload };
64 case ORDER_LIST_FAIL:
65 return { loading: false, error: action.payload };
66 default: return state;
67 }
68}
69
70function orderPayReducer(state = {
71 order: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected