summaryrefslogtreecommitdiff
path: root/src/lib/promotinProgram
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-06-19 15:46:03 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-06-19 15:46:03 +0700
commit637c22f1886cecf7307ced88dc951134d466a3fa (patch)
tree7f00f63e13b3f5e56f3da06da1f98010937cd3cc /src/lib/promotinProgram
parente4b4f2c09ebd819acc204c2e58288fe9fc6294ea (diff)
checkout
Diffstat (limited to 'src/lib/promotinProgram')
-rw-r--r--src/lib/promotinProgram/components/HomePage.jsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/promotinProgram/components/HomePage.jsx b/src/lib/promotinProgram/components/HomePage.jsx
index 8d159899..c0968161 100644
--- a/src/lib/promotinProgram/components/HomePage.jsx
+++ b/src/lib/promotinProgram/components/HomePage.jsx
@@ -27,7 +27,6 @@ const HomePage = () => {
}
)
-
useEffect(() => {
if (titlePromotion && titlePromotion.length > 0) {
setActiveTab(titlePromotion[0].name)
@@ -36,11 +35,11 @@ const HomePage = () => {
setActiveBanner(titlePromotion[0].banner)
productPromotionRefetch()
}
- }, [titlePromotion])
+ }, [titlePromotion, productPromotionRefetch])
useEffect(() => {
if (productPromotion) {
- setparentPromotions(() => {
+ setparentPromotions((parentPromotions) => {
return parentPromotions.map((title) => {
if (title.id === activeId && title.products === undefined) {
return {
@@ -52,7 +51,7 @@ const HomePage = () => {
})
})
}
- }, [productPromotion, parentPromotions, activeId])
+ }, [productPromotion, activeId])
const { isMobile, isDesktop } = useDevice()
const handleTabClick = (id, label, banner) => {