summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-promo/components/Card.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate/modules/product-promo/components/Card.tsx')
-rw-r--r--src-migrate/modules/product-promo/components/Card.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src-migrate/modules/product-promo/components/Card.tsx b/src-migrate/modules/product-promo/components/Card.tsx
index 2874c2cc..e894c143 100644
--- a/src-migrate/modules/product-promo/components/Card.tsx
+++ b/src-migrate/modules/product-promo/components/Card.tsx
@@ -5,11 +5,12 @@ import { InfoIcon, PlusIcon } from "lucide-react"
import { Skeleton, Tooltip } from '@chakra-ui/react'
import { motion } from "framer-motion"
+import { PROMO_CATEGORY } from "~/constants/promotion"
+import { getVariantById } from "~/services/variant"
+
import { IProductVariantPromo, IPromotion } from '~/common/types/promotion'
import formatCurrency from '~/common/libs/formatCurrency'
import clsxm from '~/common/libs/clsxm'
-import { PROMO_CATEGORY } from "~/constants/promotion"
-import { getVariantById } from "~/services/variant"
import ProductPromoItem from './Item'
import ProductPromoAddToCart from "./AddToCart"
@@ -82,7 +83,10 @@ const ProductPromoCard = ({ promotion }: Props) => {
{allProducts.map((product, index) => (
<>
<motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} transition={{ duration: 0.6 }}>
- <ProductPromoItem variant={product} />
+ <ProductPromoItem
+ variant={product}
+ isFree={index + 1 > products.length && promotion.type.value === 'merchandise'}
+ />
</motion.div>
<motion.div initial={{ y: 30, opacity: 0 }} animate={{ y: 0, opacity: 1 }} transition={{ duration: 0.5, delay: 0.1 }}>
{index + 1 < allProducts.length && (