complete the cart add item hander

This commit is contained in:
oscar 2023-03-18 22:50:22 +13:00
parent cada9d84fb
commit e2dfadc739

View File

@ -12,7 +12,7 @@ const Cart = (props) => {
const hasItems = cartCtx.items.length > 0;
const cartItemAddHandler = (item) => {
cartCtx.addItem(item);
cartCtx.addItem({ ...item, amount: 1 });
};
const cartItemRemoveHandler = (id) => {