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

Function orderPayReducer

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

Source from the content-addressed store, hash-verified

68}
69
70function orderPayReducer(state = {
71 order: {
72 orderItems: [],
73 shipping: {},
74 payment: {}
75 }
76}, action) {
77 switch (action.type) {
78 case ORDER_PAY_REQUEST:
79 return { loading: true };
80 case ORDER_PAY_SUCCESS:
81 return { loading: false, success: true };
82 case ORDER_PAY_FAIL:
83 return { loading: false, error: action.payload };
84 default: return state;
85 }
86}
87
88function orderDeleteReducer(state = {
89 order: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected