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

Function openModal

frontend/src/screens/ProductsScreen.js:49–59  ·  view source on GitHub ↗
(product)

Source from the content-addressed store, hash-verified

47 }, [successSave, successDelete]);
48
49 const openModal = (product) => {
50 setModalVisible(true);
51 setId(product._id);
52 setName(product.name);
53 setPrice(product.price);
54 setDescription(product.description);
55 setImage(product.image);
56 setBrand(product.brand);
57 setCategory(product.category);
58 setCountInStock(product.countInStock);
59 };
60 const submitHandler = (e) => {
61 e.preventDefault();
62 dispatch(

Callers 1

ProductsScreen.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected