From b9b06a23c6eca7ce2b23050c7d8c2e96ba32d270 Mon Sep 17 00:00:00 2001 From: Thomas Zillinger Date: Fri, 10 Oct 2025 18:16:41 +0200 Subject: [PATCH] Quantity is being increased twice Quantity has already being increased in line 87, newQuantitiy is already the 'new' one :) --- ecom-frontend/src/store/actions/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecom-frontend/src/store/actions/index.js b/ecom-frontend/src/store/actions/index.js index 188f3bd..a606f2a 100644 --- a/ecom-frontend/src/store/actions/index.js +++ b/ecom-frontend/src/store/actions/index.js @@ -89,7 +89,7 @@ export const increaseCartQuantity = dispatch({ type: "ADD_CART", - payload: {...data, quantity: newQuantity + 1 }, + payload: {...data, quantity: newQuantity }, }); localStorage.setItem("cartItems", JSON.stringify(getState().carts.cart)); } else { @@ -621,4 +621,4 @@ export const addNewDashboardSeller = setLoader(false); setOpen(false); } - }; \ No newline at end of file + };