diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-26 15:16:28 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2024-02-26 15:16:28 +0700 |
| commit | 7a4d2462d05b2cc0e9c66551f1e2c16d4abace2f (patch) | |
| tree | 8386c9ff02f6062dc612e795264bb3b4f3ff6df8 /src-migrate/modules/cart/components | |
| parent | a698514b32353d8f6386ce8ba8c20941ab65f569 (diff) | |
Update upsert user cart
Diffstat (limited to 'src-migrate/modules/cart/components')
| -rw-r--r-- | src-migrate/modules/cart/components/ItemAction.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src-migrate/modules/cart/components/ItemAction.tsx b/src-migrate/modules/cart/components/ItemAction.tsx index 859c758c..e73d507b 100644 --- a/src-migrate/modules/cart/components/ItemAction.tsx +++ b/src-migrate/modules/cart/components/ItemAction.tsx @@ -51,7 +51,13 @@ const CartItemAction = ({ item }: Props) => { if (typeof auth !== 'object' || isNaN(debounceQty)) return setIsLoadQuantity(true) - await upsertUserCart(auth.id, item.cart_type, item.id, debounceQty, item.selected) + await upsertUserCart({ + userId: auth.id, + type: item.cart_type, + id: item.id, + qty: debounceQty, + selected: item.selected, + }) await loadCart(auth.id) setIsLoadQuantity(false) } |
