(productId)
| 12 | const qty = props.location.search ? Number(props.location.search.split("=")[1]) : 1; |
| 13 | const dispatch = useDispatch(); |
| 14 | const removeFromCartHandler = (productId) => { |
| 15 | dispatch(removeFromCart(productId)); |
| 16 | } |
| 17 | useEffect(() => { |
| 18 | if (productId) { |
| 19 | dispatch(addToCart(productId, qty)); |
nothing calls this directly
no test coverage detected