From 6c79d14a11c8dba20778c0559230a406cd147cc7 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 3 Jul 2024 08:34:16 +0700
Subject: <iman> update category management

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

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

diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index 253c3703..29cf94da 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -74,7 +74,6 @@ const ProductSearch = ({
 
   const categoryId = getIdFromSlug(prefixUrl)
 
-
   useEffect(() => {
     if (productFound == 0 && query.q && !spellings) {
       searchSpellApi({ query: query.q }).then((response) => {
@@ -121,18 +120,16 @@ const ProductSearch = ({
       checkIfBrand();
     }
   }, [q]);
-
+ 
   useEffect(() => {
     const loadCategories = async () => {
-     const getCategories = await odooApi('GET', '/api/v1/category/child?partner_id='+{categoryId})
+      const getCategories = await odooApi('GET', `/api/v1/category/child?parent_id=${categoryId}`) 
      if(getCategories){
       setDataCategories(getCategories)
      }
     }
     loadCategories()
   }, [])
-  
-  console.log('Data Category : ', dataCategories)
 
   const brands = [];
   for (
-- 
cgit v1.2.3

