From 4c6ad774cbb4be9a28af066c9667bd9765826a75 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Mon, 18 Sep 2023 11:08:27 +0700
Subject: migrasi category home page ke solr

---
 src/lib/home/components/CategoryHome.jsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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

diff --git a/src/lib/home/components/CategoryHome.jsx b/src/lib/home/components/CategoryHome.jsx
index 34c28728..9e992640 100644
--- a/src/lib/home/components/CategoryHome.jsx
+++ b/src/lib/home/components/CategoryHome.jsx
@@ -7,14 +7,14 @@ const CategoryHome = ({ id }) => {
 
   return (
     <div className='p-4 sm:py-8 relative bg-gray-100 border border-gray-200 min-h-[240px]'>
-      {categoryHome?.data?.length > 0 ? (
+      {categoryHome.data ? (
         <ProductSlider
           products={{
-            products: categoryHome.data?.[0].products,
+            products: categoryHome?.data?.products,
             banner: {
-              image: categoryHome.data?.[0].image,
-              name: categoryHome.data?.[0].name,
-              url: categoryHome.data?.[0].url
+              image: categoryHome?.data?.image,
+              name: categoryHome?.data?.name,
+              url: categoryHome?.data?.url
             }
           }}
           simpleTitle
-- 
cgit v1.2.3

