summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-detail/components/AddToCart.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src-migrate/modules/product-detail/components/AddToCart.tsx')
-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