From dac398aa33f8e57fd17fc9b115cf435c2d877b19 Mon Sep 17 00:00:00 2001
From: FIN-IT_AndriFP <andrifebriyadiputra@gmail.com>
Date: Wed, 28 Jan 2026 11:05:37 +0700
Subject: fix

---
 .../modules/product-detail/components/ProductComparisonModal.tsx    | 6 ------
 1 file changed, 6 deletions(-)

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

diff --git a/src-migrate/modules/product-detail/components/ProductComparisonModal.tsx b/src-migrate/modules/product-detail/components/ProductComparisonModal.tsx
index d9b0a436..b836c892 100644
--- a/src-migrate/modules/product-detail/components/ProductComparisonModal.tsx
+++ b/src-migrate/modules/product-detail/components/ProductComparisonModal.tsx
@@ -223,7 +223,6 @@ const ProductComparisonModal = ({ isOpen, onClose, mainProduct, selectedVariant
   // ===========================================================================
   useEffect(() => {
     const delayDebounceFn = setTimeout(async () => {
-      // Validasi panjang karakter (biarkan tetap minimal 3 agar tidak berat)
       if (searchQuery.length > 0 && searchQuery.length < 3) {
         setSearchResults([]);
         return;
@@ -241,12 +240,9 @@ const ProductComparisonModal = ({ isOpen, onClose, mainProduct, selectedVariant
 
       setIsSearching(true);
       try {
-        // [FIX 1] Gunakan 'let' agar tidak error saat diubah nilainya
         let queryParam = '*';
         
         if (searchQuery !== '') {
-            // [FITUR] Wildcard Search: Ubah "7 inc" menjadi "*7* *inc*"
-            // Ini membantu pencarian parsial (typo tolerance sederhana)
             const words = searchQuery.trim().split(/\s+/);
             queryParam = words.map(w => `*${w}*`).join(' ');
         }
@@ -256,14 +252,12 @@ const ProductComparisonModal = ({ isOpen, onClose, mainProduct, selectedVariant
           q: queryParam, 
           limit: '20',
           fq: `attribute_set_id_i:${attrSetId}`,
-          // [FIX 2] Matikan Grouping agar varian muncul terpisah
           group: 'false' 
         });
 
         const res = await fetch(`/api/shop/search?${params.toString()}`);
         if (res.ok) {
           const data = await res.json();
-          // Ambil produk dari response
           setSearchResults(data.response?.products || []);
         } else {
           setSearchResults([]);
-- 
cgit v1.2.3

