diff --git a/src/Checkout/CheckoutProduct.js b/src/Checkout/CheckoutProduct.js index 39c3703..1d83067 100644 --- a/src/Checkout/CheckoutProduct.js +++ b/src/Checkout/CheckoutProduct.js @@ -1,7 +1,15 @@ import React from "react"; +import { useStateValue } from "../redux/StateProvider"; import "./CheckoutProduct.css"; function CheckoutProduct({ id, image, title, price, rating }) { + const [{ bakset }, dispatch] = useStateValue(); + const removeFromBasket = () => { + dispatch({ + type: "REMOVE_FROM_BASKET", + id: id, + }); + }; return (
product info @@ -19,7 +27,7 @@ function CheckoutProduct({ id, image, title, price, rating }) {

🌟

))} - +
);