From fc635c6ce35d8b40baffb456e25342957a781940 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 6 Sep 2024 10:47:09 +0700
Subject: <iman> update solr mapping category management

---
 src/lib/home/components/CategoryDynamic.jsx | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

(limited to 'src/lib/home/components/CategoryDynamic.jsx')

diff --git a/src/lib/home/components/CategoryDynamic.jsx b/src/lib/home/components/CategoryDynamic.jsx
index 14015e28..11a15d6d 100644
--- a/src/lib/home/components/CategoryDynamic.jsx
+++ b/src/lib/home/components/CategoryDynamic.jsx
@@ -14,6 +14,27 @@ import { Navigation, Pagination, Autoplay } from 'swiper';
 
 const CategoryDynamic = () => {
 
+  const [manufactures, setManufactures] = useState([])
+  const loadBrand = useCallback(async () => {
+    // setIsLoading(true)
+    //Get brand from odoo
+    /*const result = await odooApi(
+      'GET',
+      `/api/v1/manufacture?limit=0&offset=${manufactures.length}&name=${name}`
+    )*/
+
+    // Change get brands from solr
+    const items = await fetchPopulerProductSolr();
+
+    console.log("items",items)
+    
+    // setIsLoading(false)
+    // setManufactures((manufactures) => [...result.data])
+  }, [])
+
+  useEffect(() => {
+    loadBrand()
+  }, [loadBrand])
   const { categoryManagement } = useCategoryManagement();
   // const [categoryData, setCategoryData] = useState({});
   // const [subCategoryData, setSubCategoryData] = useState({});
-- 
cgit v1.2.3

