(state = {
order: {
orderItems: [],
shipping: {},
payment: {}
}
}, action)
| 68 | } |
| 69 | |
| 70 | function 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 | |
| 88 | function orderDeleteReducer(state = { |
| 89 | order: { |
nothing calls this directly
no outgoing calls
no test coverage detected