summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/components/AddToCart.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate/modules/product-detail/components/AddToCart.tsx')
-rw-r--r--src-migrate/modules/product-detail/components/AddToCart.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src-migrate/modules/product-detail/components/AddToCart.tsx b/src-migrate/modules/product-detail/components/AddToCart.tsx
index ebd6be7a..097db98a 100644
--- a/src-migrate/modules/product-detail/components/AddToCart.tsx
+++ b/src-migrate/modules/product-detail/components/AddToCart.tsx
@@ -36,7 +36,15 @@ const AddToCart = ({
) return;
toast.promise(
- upsertUserCart(auth.id, 'product', variantId, quantity, true, source),
+ upsertUserCart({
+ userId: auth.id,
+ type: 'product',
+ id: variantId,
+ qty: quantity,
+ selected: true,
+ source: source,
+ qtyAppend: true
+ }),
{
loading: { title: 'Menambahkan ke keranjang', description: 'Mohon tunggu...' },
success: { title: 'Menambahkan ke keranjang', description: 'Berhasil menambahkan ke keranjang belanja' },