in client/src/components/product-item.js [138:151]
async addToCart(event) {
event?.preventDefault();
const { productItem } = this.state;
const result = await cache.get(productItem.name);
let count = result?.count ? result.count + 1 : 1;
cache.set(productItem.name, {
...productItem,
count,
});
this.showCartDialog();
}