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 | |
| parent | f7a13c357a6d44f9fa6e0c034292ab782249731e (diff) | |
| parent | 37cd18a88f0f104e81c1b6f33f9bab7b2a0b2dfb (diff) | |
Merge branch 'new-release' into CR/website-improvement
Diffstat (limited to 'src-migrate/modules')
3 files changed, 46 insertions, 26 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' diff --git a/src-migrate/modules/register/components/TermCondition.tsx b/src-migrate/modules/register/components/TermCondition.tsx index d54fe921..44275917 100644 --- a/src-migrate/modules/register/components/TermCondition.tsx +++ b/src-migrate/modules/register/components/TermCondition.tsx @@ -1,34 +1,48 @@ -import { Checkbox } from '@chakra-ui/react' -import React from 'react' -import { Modal } from '~/components/ui/modal' -import { useRegisterStore } from "../stores/useRegisterStore"; -import PageContent from '~/modules/page-content' +import { Checkbox } from '@chakra-ui/react'; +import React from 'react'; +import { Modal } from '~/components/ui/modal'; +import { useRegisterStore } from '../stores/useRegisterStore'; + +import dynamic from 'next/dynamic'; +const PageContent = dynamic( + () => import('@/lib/content/components/PageContent') +); const TermCondition = () => { - const { isOpenTNC, closeTNC, isCheckedTNC, toggleCheckTNC, openTNC } = useRegisterStore() + const { isOpenTNC, closeTNC, isCheckedTNC, toggleCheckTNC, openTNC } = + useRegisterStore(); return ( <> - <div className="mt-4 flex items-center gap-x-2"> - <Checkbox id='tnc' name='tnc' colorScheme='red' isChecked={isCheckedTNC} onChange={toggleCheckTNC} /> + <div className='mt-4 flex items-center gap-x-2'> + <Checkbox + id='tnc' + name='tnc' + colorScheme='red' + isChecked={isCheckedTNC} + onChange={toggleCheckTNC} + /> <div> - <label htmlFor="tnc" className="cursor-pointer">Dengan ini saya menyetujui</label> - {' '} + <label htmlFor='tnc' className='cursor-pointer'> + Dengan ini saya menyetujui + </label>{' '} <span - className="font-medium text-danger-500 cursor-pointer" + className='font-medium text-danger-500 cursor-pointer' onClick={openTNC} > syarat dan ketentuan </span> - <label htmlFor="tnc" className="ml-2 cursor-pointer">yang berlaku</label> + <label htmlFor='tnc' className='ml-2 cursor-pointer'> + yang berlaku + </label> </div> </div> - <Modal active={isOpenTNC} close={closeTNC} > - <PageContent path='/register#tnd' /> + <Modal active={isOpenTNC} close={closeTNC}> + <PageContent path='/registerTnd' /> </Modal> </> - ) -} + ); +}; -export default TermCondition
\ No newline at end of file +export default TermCondition; |
