From ab86fdfd91837630d5ebd81865c60a212a8b27f1 Mon Sep 17 00:00:00 2001
From: Mqdd <ahmadmiqdad27@gmail.com>
Date: Wed, 4 Feb 2026 14:07:56 +0700
Subject: <Miqdad> fix variant select

---
 .../modules/product-detail/components/PriceAction.tsx        | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'src-migrate/modules/product-detail/components/PriceAction.tsx')

diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx
index ee8009ef..ea65b3d1 100644
--- a/src-migrate/modules/product-detail/components/PriceAction.tsx
+++ b/src-migrate/modules/product-detail/components/PriceAction.tsx
@@ -302,14 +302,14 @@ const PriceAction = ({ product, onCompare }: Props) => {
         <div className={`${style['action-wrapper']}`}>
           <AddToCart
             products={product}
-            variantId={activeVariantId}
+            variantId={selectedVariant?.id ?? null}
             quantity={Number(quantityInput)}
           />
           {!isApproval && (
             <AddToCart
               source='buy'
               products={product}
-              variantId={activeVariantId}
+              variantId={selectedVariant?.id ?? null}
               quantity={Number(quantityInput)}
             />
           )}
@@ -319,7 +319,7 @@ const PriceAction = ({ product, onCompare }: Props) => {
           <AddToQuotation
             source='buy'
             products={product}
-            variantId={activeVariantId}
+            variantId={selectedVariant?.id ?? null}
             quantity={Number(quantityInput)}
             onCompare={onCompare} 
           />
@@ -331,14 +331,14 @@ const PriceAction = ({ product, onCompare }: Props) => {
             <AddToQuotation
               source='buy'
               products={product}
-              variantId={activeVariantId}
+              variantId={selectedVariant?.id ?? null}
               quantity={Number(quantityInput)}
             />
           </div>
           <div className='col-span-5'>
             <AddToCart
               products={product}
-              variantId={activeVariantId}
+              variantId={selectedVariant?.id ?? null}
               quantity={Number(quantityInput)}
             />
           </div>
@@ -347,7 +347,7 @@ const PriceAction = ({ product, onCompare }: Props) => {
               <AddToCart
                 source='buy'
                 products={product}
-                variantId={activeVariantId}
+                variantId={selectedVariant?.id ?? null}
                 quantity={Number(quantityInput)}
               />
             )}
-- 
cgit v1.2.3

