diff --git a/package-lock.json b/package-lock.json index 5971314..9e2fe75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6038,9 +6038,9 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, "lodash-es": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.11.tgz", - "integrity": "sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" }, "lodash._arraycopy": { "version": "3.0.0", diff --git a/src/components/Cart.js b/src/components/Cart.js index a4c58fb..fd4d0c0 100644 --- a/src/components/Cart.js +++ b/src/components/Cart.js @@ -39,7 +39,7 @@ const Cart = ({ ); return ( -
+

Your shopping cart

{nodes}

diff --git a/src/components/Product.js b/src/components/Product.js index 2a0b3f1..712a8fd 100644 --- a/src/components/Product.js +++ b/src/components/Product.js @@ -2,20 +2,20 @@ import React from "react"; import PropTypes from "prop-types"; const Product = ({ price, quantity, title, discount }) => ( -

+

{title} - {price} {quantity ? ` x ${quantity}` : null} {discount ? ` - discount: buy ${discount.get}, pay for ${discount.pay}` : null} -

+

); Product.propTypes = { price: PropTypes.number, quantity: PropTypes.number, title: PropTypes.string, - discount: PropTypes.object + discount: PropTypes.object, }; export default Product; diff --git a/src/components/ProductItem.js b/src/components/ProductItem.js index 7ac0e01..7866c26 100644 --- a/src/components/ProductItem.js +++ b/src/components/ProductItem.js @@ -4,8 +4,14 @@ import Product from "./Product"; const ProductItem = ({ product, discount, onAddToCartClicked }) => (
- +