summaryrefslogtreecommitdiff
path: root/src/lib/promotinProgram/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/promotinProgram/components')
-rw-r--r--src/lib/promotinProgram/components/HomePage.jsx4
1 files changed, 2 insertions, 2 deletions
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)