From 2e71abba4ca5b83cc1fec229d4d85961c4b56d71 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 25 Jul 2024 08:27:05 +0700
Subject: <iman> update category management

---
 src/lib/product/components/CategorySection.jsx | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

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

diff --git a/src/lib/product/components/CategorySection.jsx b/src/lib/product/components/CategorySection.jsx
index 14a39e7e..2af3db10 100644
--- a/src/lib/product/components/CategorySection.jsx
+++ b/src/lib/product/components/CategorySection.jsx
@@ -13,23 +13,16 @@ import {
     HeartIcon,
 } from '@heroicons/react/24/outline';
 import { useState } from 'react'; // Import useState
+import { getIdFromSlug } from '@/core/utils/slug'
 
 const CategorySection = ({ categories }) => {
     const { isDesktop, isMobile } = useDevice();
-    const router = useRouter();
     const [isOpenCategory, setIsOpenCategory] = useState(false); // State to manage category visibility
 
-    let teks = router.query.slug;
-    let hasil = teks?.match(/(\d+)$/)[0];
-
-    const breadcrumbs = useQuery(
-        `category-breadcrumbs/${hasil}`,
-        async () => await odooApi('GET', `/api/v1/category/${hasil}/category-breadcrumb`)
-    );
-
     const handleToggleCategories = () => {
         setIsOpenCategory(!isOpenCategory);
     };
+    
 
     const displayedCategories = isOpenCategory ? categories : categories.slice(0, 10);
 
-- 
cgit v1.2.3

