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

Function orderCreateReducer

frontend/src/reducers/orderReducers.js:10–20  ·  view source on GitHub ↗
(state = {}, action)

Source from the content-addressed store, hash-verified

8
9
10function 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
23function orderDetailsReducer(state = {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected