From 48cd6983f253319940cb27b2fbbb14eb597253a6 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Mon, 25 Sep 2023 09:21:33 +0700
Subject: add update cart di page variant product

---
 src/lib/product/components/Product/ProductDesktopVariant.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/product/components/Product/ProductDesktopVariant.jsx')

diff --git a/src/lib/product/components/Product/ProductDesktopVariant.jsx b/src/lib/product/components/Product/ProductDesktopVariant.jsx
index df294df5..3ed68ba3 100644
--- a/src/lib/product/components/Product/ProductDesktopVariant.jsx
+++ b/src/lib/product/components/Product/ProductDesktopVariant.jsx
@@ -29,7 +29,7 @@ const ProductDesktopVariant = ({ product, wishlist, toggleWishlist, isVariant })
   const [addCartAlert, setAddCartAlert] = useState(false)
   const [isLoadingSLA, setIsLoadingSLA] = useState(true)
 
-  const {setRefreshCart} = useProductCartContext()
+  const { setRefreshCart } = useProductCartContext()
 
   const getLowestPrice = useCallback(() => {
     const lowest = product.price
@@ -74,8 +74,9 @@ const ProductDesktopVariant = ({ product, wishlist, toggleWishlist, isVariant })
       programLineId: null,
       selected: true,
       source: null
+    }).then(() => {
+      setRefreshCart(true)
     })
-    setRefreshCart(true)
     setAddCartAlert(true)
   }
 
-- 
cgit v1.2.3

