(state = {}, action)
| 8 | |
| 9 | |
| 10 | function orderCreateReducer(state = {}, action) { |
| 11 | switch (action.type) { |
| 12 | case ORDER_CREATE_REQUEST: |
| 13 | return { loading: true }; |
| 14 | case ORDER_CREATE_SUCCESS: |
| 15 | return { loading: false, order: action.payload, success: true }; |
| 16 | case ORDER_CREATE_FAIL: |
| 17 | return { loading: false, error: action.payload }; |
| 18 | default: return state; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | |
| 23 | function orderDetailsReducer(state = { |
nothing calls this directly
no outgoing calls
no test coverage detected