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

Function placeOrderHandler

frontend/src/screens/PlaceOrderScreen.js:25–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 const dispatch = useDispatch();
24
25 const placeOrderHandler = () => {
26 // create an order
27 dispatch(createOrder({
28 orderItems: cartItems, shipping, payment, itemsPrice, shippingPrice,
29 taxPrice, totalPrice
30 }));
31 }
32 useEffect(() => {
33 if (success) {
34 props.history.push("/order/" + order._id);

Callers

nothing calls this directly

Calls 1

createOrderFunction · 0.90

Tested by

no test coverage detected