summaryrefslogtreecommitdiff
path: root/src-migrate
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2024-11-20 13:36:01 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2024-11-20 13:36:01 +0700
commitf7dad0695d83a4e59b9423d6e7aedb554f716b52 (patch)
tree8f968661d7bb0df3635ade6870b9d1486f8538ad /src-migrate
parentd078c6adfd896b59f14e2a5116ecb977256674fa (diff)
parente2a12aa22089349cb48511d0584991b9db64e0ca (diff)
Merge branch 'new-release' into feature/integrasi_biteship
Diffstat (limited to 'src-migrate')
-rw-r--r--src-migrate/modules/product-detail/components/Information.tsx22
-rw-r--r--src-migrate/pages/shop/cart/index.tsx2
2 files changed, 14 insertions, 10 deletions
diff --git a/src-migrate/modules/product-detail/components/Information.tsx b/src-migrate/modules/product-detail/components/Information.tsx
index b9f4be91..5e1ea186 100644
--- a/src-migrate/modules/product-detail/components/Information.tsx
+++ b/src-migrate/modules/product-detail/components/Information.tsx
@@ -96,7 +96,7 @@ const Information = ({ product }: Props) => {
<label className='form-label mb-2 text-lg text-red-600'>
Pilih Variant * :{' '}
<span className='text-gray_r-9 text-sm'>
- {product?.variant_total} Variants
+ {product?.variants?.length} Variants
</span>{' '}
</label>
<AutoComplete
@@ -190,13 +190,19 @@ const Information = ({ product }: Props) => {
product.manufacture.id.toString()
)}
>
- <Image
- height={50}
- width={100}
- src={product.manufacture.logo}
- alt={product.manufacture.name}
- className='h-8 object-fit'
- />
+ {product?.manufacture.logo ? (
+ <Image
+ height={50}
+ width={100}
+ src={product.manufacture.logo}
+ alt={product.manufacture.name}
+ className='h-8 object-fit'
+ />
+ ) : (
+ <p className='font-bold text-red-500'>
+ {product.manufacture.name}
+ </p>
+ )}
</Link>
) : (
'-'
diff --git a/src-migrate/pages/shop/cart/index.tsx b/src-migrate/pages/shop/cart/index.tsx
index 70a28073..24baa933 100644
--- a/src-migrate/pages/shop/cart/index.tsx
+++ b/src-migrate/pages/shop/cart/index.tsx
@@ -35,8 +35,6 @@ const CartPage = () => {
const [hasChanged, setHasChanged] = useState(false);
const prevCartRef = useRef<CartItem[] | null>(null);
- console.log('ini cart', cart);
-
useEffect(() => {
const handleScroll = () => {
setIsTop(window.scrollY < 200);