timroesner / WeMart

🛒 Online grocery shopping portal. Created as part of the course CmpE 133 during spring 2018.
https://wemart-133.herokuapp.com
GNU General Public License v3.0
19 stars 10 forks source link

handleAddToCart is not consistent across pages #65

Closed juancstlm closed 6 years ago

juancstlm commented 6 years ago

the Item.js page uses cart[this.state.item.itemid] = ++quantity while the ItemCards use cart[this.props.itemID] = item

This will cause an issue with check out page wich uses cart[this.props.itemID] = item

We talked about just using itemId and quanity in local storage and not the whole item object.

Can we agree on which to use so that check out can be updated accordingly.

timroesner commented 6 years ago

Voting for itemId and quantity in local storage. That's how it's currently in checkout right?

juancstlm commented 6 years ago

I like item id and quanity asswell but check out is coded for the item object. Should be a 10 min fix.

timroesner commented 6 years ago

Oh yeah just read the comment on the cart PR. Will fix 👍

timroesner commented 6 years ago

This is also an issue with the Counter component, especially in displaying the quantity from cart

juancstlm commented 6 years ago

@timroesner Is this still an issue?

timroesner commented 6 years ago

I think we're good