feat: remove from card
This commit is contained in:
parent
52c987b88e
commit
483fcedfd9
3 changed files with 12 additions and 3 deletions
|
|
@ -588,6 +588,14 @@ const market = async () => {
|
|||
|
||||
this.$q.localStorage.set('nostrmarket.shoppingCarts', this.shoppingCarts)
|
||||
console.log('### this.shoppingCarts', this.shoppingCarts)
|
||||
},
|
||||
|
||||
removeProductFromCart(item) {
|
||||
const stallCart = this.shoppingCarts.find(c => c.id === item.stallId)
|
||||
if (stallCart) {
|
||||
stallCart.products = stallCart.products.filter(p => p.id !== item.productId)
|
||||
this.$q.localStorage.set('nostrmarket.shoppingCarts', this.shoppingCarts)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue