diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-07-06 10:21:50 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-07-06 10:21:50 +0700 |
| commit | ead27f576ea73bb4625fea839ee78c4a8db0d4e9 (patch) | |
| tree | 24c31b02f1183a623b39118c13d63dce4c474b16 /src/lib/promotinProgram/components | |
| parent | cb69cf4e6633bb9192cd7bdc0a0063541f67102f (diff) | |
variant page
Diffstat (limited to 'src/lib/promotinProgram/components')
| -rw-r--r-- | src/lib/promotinProgram/components/PromotionType.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/promotinProgram/components/PromotionType.jsx b/src/lib/promotinProgram/components/PromotionType.jsx index 44d1b524..ad7185e3 100644 --- a/src/lib/promotinProgram/components/PromotionType.jsx +++ b/src/lib/promotinProgram/components/PromotionType.jsx @@ -3,7 +3,6 @@ import Image from '@/core/components/elements/Image/Image' import BottomPopup from '@/core/components/elements/Popup/BottomPopup' import CountDown2 from '@/core/components/elements/CountDown/CountDown2' import currencyFormat from '@/core/utils/currencyFormat' -import odooApi from '@/core/api/odooApi' import { getPromotionProgram } from '../api/homepageApi' const PromotionType = ({ @@ -16,11 +15,10 @@ const PromotionType = ({ setProducts = null }) => { const [selectedPromo, setSelectedPromo] = useState(null) - const [promotionType, setPromotionType] = useState(false) const [promos, setPromotionList] = useState(null) const [activeTitle, setActiveTitle] = useState(null) - const [quantitySet, setQuantity] = useState(quantity) + const [quantitySet, setQuantity] = useState(null) useEffect(() => { const id = variantId @@ -36,6 +34,8 @@ const PromotionType = ({ if (product) { const variant = product.variants.find((variant) => variant.id === variantId) setQuantity(variant.quantity) + }else{ + setQuantity(quantity) } }, []) |
