diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-29 10:37:21 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-29 10:37:21 +0700 |
| commit | c996c4e0631aa3d51acc83f4cc23418e91f3158f (patch) | |
| tree | 63d31733edd048ea50780d966ff0a1d5a4fa4866 /src-migrate/modules/product-detail | |
| parent | f7a13c357a6d44f9fa6e0c034292ab782249731e (diff) | |
| parent | 37cd18a88f0f104e81c1b6f33f9bab7b2a0b2dfb (diff) | |
Merge branch 'new-release' into CR/website-improvement
Diffstat (limited to 'src-migrate/modules/product-detail')
| -rw-r--r-- | src-migrate/modules/product-detail/components/Information.tsx | 22 | ||||
| -rw-r--r-- | src-migrate/modules/product-detail/components/PriceAction.tsx | 2 |
2 files changed, 15 insertions, 9 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/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx index 413c643a..0b27b1b3 100644 --- a/src-migrate/modules/product-detail/components/PriceAction.tsx +++ b/src-migrate/modules/product-detail/components/PriceAction.tsx @@ -162,7 +162,7 @@ const PriceAction = ({ product }: Props) => { </span> */} </div> <div> - {product?.is_in_bu && ( + {selectedVariant?.is_in_bu && ( <Link href='/panduan-pick-up-service' className='group'> <Image src='/images/PICKUP-NOW.png' |
