diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-06-15 15:45:43 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-06-15 15:45:43 +0700 |
| commit | e4b4f2c09ebd819acc204c2e58288fe9fc6294ea (patch) | |
| tree | a22399091ca0e4f35948ddcb58b2321d26c4c4c2 /src/lib/promotinProgram | |
| parent | eb4ae7be05ed97bd02b7f3e9cc56393f435188e2 (diff) | |
get dan delete cart
Diffstat (limited to 'src/lib/promotinProgram')
| -rw-r--r-- | src/lib/promotinProgram/components/HomePage.jsx | 4 |
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) |
