complete the cart add item hander

main
oscar 2023-03-18 22:50:22 +13:00
parent cada9d84fb
commit e2dfadc739
1 changed files with 1 additions and 1 deletions

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) => {