diff --git a/src/components/CartItems.jsx b/src/components/CartItems.jsx index 5a9ea66..b178a52 100644 --- a/src/components/CartItems.jsx +++ b/src/components/CartItems.jsx @@ -1,84 +1,94 @@ -import React, { useContext } from 'react'; -import { ShopContext } from '../context/ShopContext'; -import remove_icon from './assets/cart_cross_icon.png'; +import React, { useContext } from "react"; +import { ShopContext } from "../context/ShopContext"; +import remove_icon from "./assets/cart_cross_icon.png"; const CartItems = () => { - const { all_product, cartItems, removeToCart, getTotalCartAmount } = useContext(ShopContext); - - return ( -
Products
-Title
-New Price
-Old Price
-Quantity
-Total
-Remove
-{e.name}
-${e.new_price}
-${e.old_price}
{/* Old Price with strikethrough */} - -${e.new_price * cartItems[e.id]}
-Products
+Title
+New Price
+Old Price
+Quantity
+Total
+Remove
+Cart Totals
-Subtotal
-${getTotalCartAmount()}
-Shipping Fee
-Free
-{e.name}
+${e.new_price}
++ ${e.old_price} +
{" "} + {/* Old Price with strikethrough */} +${e.new_price * cartItems[e.id]}
+If you have a promo code, enter here!
-Cart Totals
+Subtotal
+${getTotalCartAmount()}
+Shipping Fee
+Free
If you have a promo code, enter here!
+