(state = {
orders: []
}, action)
| 40 | |
| 41 | |
| 42 | function 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 | |
| 56 | function orderListReducer(state = { |
| 57 | orders: [] |
nothing calls this directly
no outgoing calls
no test coverage detected