upgraded cart add function

This commit is contained in:
Jelaletdin12
2025-12-24 15:43:27 +05:00
parent 2b46d525f2
commit d3ed4d1901
9 changed files with 224 additions and 126 deletions

View File

@@ -195,7 +195,6 @@ export default function ProductCard({
productId: id,
quantity: localQuantity,
});
await refetchCart();
toast.success(t("added_to_cart"), {
description: `${name} ${t("added_to_cart_description")}`,
});
@@ -206,7 +205,7 @@ export default function ProductCard({
setIsSyncing(false);
}
},
[id, name, localQuantity, availableStock, addToCartMutation, refetchCart]
[id, name, localQuantity, availableStock, addToCartMutation]
);
const handleQuantityChange = useCallback(