complete the cart add item hander
This commit is contained in:
parent
cada9d84fb
commit
e2dfadc739
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user