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

Function submitHandler

frontend/src/screens/ProductsScreen.js:60–74  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

58 setCountInStock(product.countInStock);
59 };
60 const submitHandler = (e) => {
61 e.preventDefault();
62 dispatch(
63 saveProduct({
64 _id: id,
65 name,
66 price,
67 image,
68 brand,
69 category,
70 countInStock,
71 description,
72 })
73 );
74 };
75 const deleteHandler = (product) => {
76 dispatch(deleteProdcut(product._id));
77 };

Callers

nothing calls this directly

Calls 1

saveProductFunction · 0.90

Tested by

no test coverage detected