From 24e9fce241cfdada5e84fe886f49ee001a614c0d Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Sat, 7 May 2022 15:58:34 -0700 Subject: [PATCH] doc: add hideButton to hide the button in orders page --- src/Checkout/CheckoutProduct.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Checkout/CheckoutProduct.js b/src/Checkout/CheckoutProduct.js index 1d83067..807a46d 100644 --- a/src/Checkout/CheckoutProduct.js +++ b/src/Checkout/CheckoutProduct.js @@ -2,7 +2,7 @@ import React from "react"; import { useStateValue } from "../redux/StateProvider"; import "./CheckoutProduct.css"; -function CheckoutProduct({ id, image, title, price, rating }) { +function CheckoutProduct({ id, image, title, price, rating, hideButton }) { const [{ bakset }, dispatch] = useStateValue(); const removeFromBasket = () => { dispatch({ @@ -27,7 +27,9 @@ function CheckoutProduct({ id, image, title, price, rating }) {

🌟

))} - + {!hideButton && ( + + )} );