Fix cart provider

This commit is contained in:
Luis Alvarez
2020-10-06 21:00:36 -05:00
parent b5b5d1343f
commit 0483e97954
3 changed files with 11 additions and 18 deletions

View File

@@ -38,13 +38,11 @@ const CartItem = ({
useEffect(() => {
// Reset the quantity state if the item quantity changes
if (item.quantity !== quantity) {
if (item.quantity !== Number(quantity)) {
setQuantity(item.quantity)
}
}, [item.quantity])
console.log('ITEM', item)
return (
<li className="flex flex-row space-x-6">
<div className="h-12 w-12 bg-violet"></div>