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

Function submitHandler

frontend/src/screens/ProductScreen.js:32–42  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

30 };
31 }, [productSaveSuccess]);
32 const submitHandler = (e) => {
33 e.preventDefault();
34 // dispatch actions
35 dispatch(
36 saveProductReview(props.match.params.id, {
37 name: userInfo.name,
38 rating: rating,
39 comment: comment,
40 })
41 );
42 };
43 const handleAddToCart = () => {
44 props.history.push('/cart/' + props.match.params.id + '?qty=' + qty);
45 };

Callers

nothing calls this directly

Calls 1

saveProductReviewFunction · 0.90

Tested by

no test coverage detected