diff --git a/package-lock.json b/package-lock.json index d01ddfa..bbd664e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "react-ecommerce", "version": "0.0.1", "dependencies": { "@headlessui/react": "^1.6.0", diff --git a/src/Components/ProductTable.jsx b/src/Components/ProductTable.jsx index ea76621..643bdab 100644 --- a/src/Components/ProductTable.jsx +++ b/src/Components/ProductTable.jsx @@ -7,7 +7,12 @@ const getDefaultFilterOptions = () => { { minValue: 0, maxValue: 25, label: "$0 - $25", checked: false }, { minValue: 25, maxValue: 50, label: "$25 - $50", checked: false }, { minValue: 50, maxValue: 75, label: "$50 - $75", checked: false }, - { minValue: 75, maxValue: Number.MAX_VALUE, label: "$75+", checked: false }, + { + minValue: 75, + maxValue: Number.MAX_VALUE, + label: "$75+", + checked: false, + }, ], color: [ { value: "beige", label: "Beige", checked: false }, @@ -41,13 +46,15 @@ export default function ProductTable({ cart, updateCart }) { setProducts(body); }; fetchProducts(); - }); + }, []); return (

Products

- +
{products.map((product) => ( @@ -82,7 +89,9 @@ export default function ProductTable({ cart, updateCart }) {

{product.name}

-

${product.price}

+

+ ${product.price} +

))}