summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-promo/components/AddToCart.tsx
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-08-02 10:16:46 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-08-02 10:16:46 +0000
commitd8510399c21b2cf4bf606441397a0142bc265a94 (patch)
tree75543baf82a73fb7e8dea6c8a1c353e02c57bbcd /src-migrate/modules/product-promo/components/AddToCart.tsx
parent6a2c25e83a45eeb5d613a99a0caa6f0ec1aae15f (diff)
parent55c9f5e1fb868c85e704529ac914b3d75fc7744e (diff)
Merged in Feature/new-cart-popup (pull request #208)
Feature/new cart popup
Diffstat (limited to 'src-migrate/modules/product-promo/components/AddToCart.tsx')
-rw-r--r--src-migrate/modules/product-promo/components/AddToCart.tsx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src-migrate/modules/product-promo/components/AddToCart.tsx b/src-migrate/modules/product-promo/components/AddToCart.tsx
index f066a4c8..10904f90 100644
--- a/src-migrate/modules/product-promo/components/AddToCart.tsx
+++ b/src-migrate/modules/product-promo/components/AddToCart.tsx
@@ -16,7 +16,6 @@ import LazyLoad from 'react-lazy-load'
import ProductSimilar from '../../../../src/lib/product/components/ProductSimilar';
import { IProductDetail } from '~/types/product';
import { useProductCartContext } from '@/contexts/ProductCartContext'
-
type Props = {
promotion: IPromotion
product: IProductDetail
@@ -32,11 +31,11 @@ const ProductPromoAddToCart = ({product, promotion }: Props) => {
const [status, setStatus] = useState<Status>('idle')
const { productCart, setRefreshCart, setProductCart, refreshCart, isLoading, setIsloading } =
useProductCartContext()
+
const productSimilarQuery = [
promotion?.name,
`fq=-product_id_i:${promotion.products[0].product_id}`,
].join('&');
-
const [addCartAlert, setAddCartAlert] = useState(false);
const handleButton = async () => {
@@ -139,7 +138,6 @@ const ProductPromoAddToCart = ({product, promotion }: Props) => {
</Link>
</div>
</div>
-
<div className='mt-8 mb-4'>
<div className='text-h-sm font-semibold mb-6'>
Kamu Mungkin Juga Suka