summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/components
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-08-02 17:15:39 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-08-02 17:15:39 +0700
commit55c9f5e1fb868c85e704529ac914b3d75fc7744e (patch)
tree75543baf82a73fb7e8dea6c8a1c353e02c57bbcd /src-migrate/modules/product-detail/components
parentd57ca7be5e2de9c48f4229b20a49a94bf05e88d1 (diff)
parent6a2c25e83a45eeb5d613a99a0caa6f0ec1aae15f (diff)
<iman> Merge branch 'development' into Feature/new-cart-popup
Diffstat (limited to 'src-migrate/modules/product-detail/components')
-rw-r--r--src-migrate/modules/product-detail/components/AddToCart.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src-migrate/modules/product-detail/components/AddToCart.tsx b/src-migrate/modules/product-detail/components/AddToCart.tsx
index 320b7234..6c9aedf8 100644
--- a/src-migrate/modules/product-detail/components/AddToCart.tsx
+++ b/src-migrate/modules/product-detail/components/AddToCart.tsx
@@ -11,6 +11,7 @@ import ProductSimilar from '../../../../src/lib/product/components/ProductSimila
import { IProductDetail } from '~/types/product';
import ImageNext from 'next/image';
import { useProductCartContext } from '@/contexts/ProductCartContext'
+
type Props = {
variantId: number | null,
quantity?: number;
@@ -75,6 +76,8 @@ const AddToCart = ({
error: { title: 'Menambahkan ke keranjang', description: 'Gagal menambahkan ke keranjang belanja' },
}
)
+
+
if (source === 'buy') {
router.push('/shop/checkout?source=buy')
@@ -140,4 +143,4 @@ const AddToCart = ({
)
}
-export default AddToCart \ No newline at end of file
+export default AddToCart \ No newline at end of file