Commit 1f2878b3 authored by Afid's avatar Afid

aaaaaaa

parent 882f594f
......@@ -207,8 +207,8 @@ const rootReducer = (state = globalState, action) => {
}
}
case ActionType.ADD_TO_CHART:{
let addedItem = action.data.order_item
let is_exist = cart_shop.find(item => addedItem.id == item.id)
let addedItem = action.data.item
let is_exist = order_item.find(item => addedItem.id == item.id)
if (is_exist) {
// update
addedItem.quantity += 1
......
......@@ -184,10 +184,10 @@ const mapDispatchToProps = (dispacth) => {
id: data.cart_shop
}
}),
addToChart: (order_item) => dispacth({
addToChart: (item) => dispacth({
type: ActionType.ADD_TO_CHART,
data: {
order_item: params.order_item
item: item
}
}),
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment