From 004a9a644aed65d5c02263f19cce8b7c3000f354 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 13 Aug 2024 10:19:38 +0700
Subject: <iman> update category

---
 src/lib/category/components/Category.jsx | 38 ++++++++++++++++----------------
 1 file changed, 19 insertions(+), 19 deletions(-)

(limited to 'src/lib/category/components/Category.jsx')

diff --git a/src/lib/category/components/Category.jsx b/src/lib/category/components/Category.jsx
index b10cb661..374cdf78 100644
--- a/src/lib/category/components/Category.jsx
+++ b/src/lib/category/components/Category.jsx
@@ -37,25 +37,25 @@ const Category = () => {
     loadCategories()
   }, [])
 
-  useEffect(() => {
-    const loadCategories = async () => {
-      let dataCategories = await odooApi('GET', '/api/v1/category/tree')
-      dataCategories = dataCategories?.map((category) => {
-        category.childs = category.childs.map((child1Category) => {
-          return {
-            ...child1Category,
-            isOpen: false
-          }
-        })
-        return {
-          ...category,
-          isOpen: false
-        }
-      })
-      setCategories(dataCategories)
-    }
-    loadCategories()
-  }, [])
+  // useEffect(() => {
+  //   const loadCategories = async () => {
+  //     let dataCategories = await odooApi('GET', '/api/v1/category/tree')
+  //     dataCategories = dataCategories?.map((category) => {
+  //       category.childs = category.childs.map((child1Category) => {
+  //         return {
+  //           ...child1Category,
+  //           isOpen: false
+  //         }
+  //       })
+  //       return {
+  //         ...category,
+  //         isOpen: false
+  //       }
+  //     })
+  //     setCategories(dataCategories)
+  //   }
+  //   loadCategories()
+  // }, [])
   // console.log("categories",categories)
 
   return (
-- 
cgit v1.2.3

