diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-29 11:10:53 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-29 11:10:53 +0700 |
| commit | aa21c215d18d0a80e7f2979f9a18f5af7db02f8c (patch) | |
| tree | 917ff6ce475701f369af6779a653841d40a359ff /src/lib/product/components/Product/ProductMobile.jsx | |
| parent | d700bbb3f841b509d0f664cdf089e656cac4413a (diff) | |
video page
Diffstat (limited to 'src/lib/product/components/Product/ProductMobile.jsx')
| -rw-r--r-- | src/lib/product/components/Product/ProductMobile.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx index 0df22026..e560639c 100644 --- a/src/lib/product/components/Product/ProductMobile.jsx +++ b/src/lib/product/components/Product/ProductMobile.jsx @@ -14,6 +14,7 @@ import { toast } from 'react-hot-toast' import useVariantPrice from '@/lib/variant/hooks/useVariantPrice' import PriceSkeleton from '@/core/components/elements/Skeleton/PriceSkeleton' import useProductPrice from '../../hooks/useProductPrice' +import { createSlug } from '@/core/utils/slug' const ProductMobile = ({ product, wishlist, toggleWishlist }) => { const router = useRouter() @@ -79,7 +80,8 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { if (!validAction()) return updateItemCart({ productId: activeVariant.id, - quantity + quantity, + selected: true }) toast.success('Berhasil menambahkan ke keranjang') } @@ -106,7 +108,11 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { <div className='p-4'> <div className='flex items-end mb-2'> {product.manufacture?.name ? ( - <Link href='/'>{product.manufacture?.name}</Link> + <Link + href={createSlug('/shop/brands/', product.manufacture?.name, product.manufacture?.id)} + > + {product.manufacture?.name} + </Link> ) : ( <div>-</div> )} |
