From e4b4f2c09ebd819acc204c2e58288fe9fc6294ea Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Thu, 15 Jun 2023 15:45:43 +0700
Subject: get dan delete cart

---
 src/lib/promotinProgram/components/HomePage.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/lib/promotinProgram/components/HomePage.jsx')

diff --git a/src/lib/promotinProgram/components/HomePage.jsx b/src/lib/promotinProgram/components/HomePage.jsx
index 9ebd82dc..8d159899 100644
--- a/src/lib/promotinProgram/components/HomePage.jsx
+++ b/src/lib/promotinProgram/components/HomePage.jsx
@@ -6,7 +6,6 @@ import useDevice from '@/core/hooks/useDevice'
 import odooApi from '@/core/api/odooApi'
 import { LazyLoadComponent } from 'react-lazy-load-image-component'
 import ProductSlider from '@/lib/product/components/ProductSlider'
-import ProductCard from '@/lib/product/components/ProductCard'
 import { PopularProductSkeleton } from '@/components/skeleton/PopularProductSkeleton'
 
 const { useQuery } = require('react-query')
@@ -28,8 +27,9 @@ const HomePage = () => {
     }
   )
 
+
   useEffect(() => {
-    if (titlePromotion) {
+    if (titlePromotion && titlePromotion.length > 0) {
       setActiveTab(titlePromotion[0].name)
       setActiveId(titlePromotion[0].id)
       setparentPromotions(titlePromotion)
-- 
cgit v1.2.3

