diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-06 15:42:41 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-06 15:42:41 +0700 |
| commit | f7a32dbccbdefd478ed6bd6190bd4fa395eda720 (patch) | |
| tree | a3db4cecc5290b73df0b54065905f876a4fca5dc /src-migrate | |
| parent | 9abd621285d739a9c502d661013db5ce96edec33 (diff) | |
<iman> update mobile view
Diffstat (limited to 'src-migrate')
| -rw-r--r-- | src-migrate/modules/product-detail/components/Information.tsx | 2 | ||||
| -rw-r--r-- | src-migrate/modules/product-detail/components/PriceAction.tsx | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src-migrate/modules/product-detail/components/Information.tsx b/src-migrate/modules/product-detail/components/Information.tsx index 8655517d..590e8afd 100644 --- a/src-migrate/modules/product-detail/components/Information.tsx +++ b/src-migrate/modules/product-detail/components/Information.tsx @@ -189,7 +189,7 @@ const Information = ({ product }: Props) => { width={100} src={product.manufacture.logo} alt={product.manufacture.name} - className='h-8 object-cover' + className='h-8 object-fit' /> </Link> ) : ( diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx index 3544fa26..dc384dda 100644 --- a/src-migrate/modules/product-detail/components/PriceAction.tsx +++ b/src-migrate/modules/product-detail/components/PriceAction.tsx @@ -7,6 +7,7 @@ import formatCurrency from '~/libs/formatCurrency'; import { IProductDetail } from '~/types/product'; import { useProductDetail } from '../stores/useProductDetail'; import AddToCart from './AddToCart'; +import useDevice from '@/core/hooks/useDevice'; type Props = { product: IProductDetail; @@ -25,7 +26,7 @@ const PriceAction = ({ product }: Props) => { selectedVariant, sla, } = useProductDetail(); - + const { isDesktop, isMobile } = useDevice(); useEffect(() => { setActive(selectedVariant); if (product.variants.length > 2 && product.variants[0].price.price === 0) { @@ -53,7 +54,10 @@ const PriceAction = ({ product }: Props) => { return ( <div - className='block md:sticky md:top-[150px] md:py-6 fixed bottom-0 left-0 right-0 bg-white p-2 z-10' + className={`block md:sticky md:top-[150px] md:py-6 fixed bottom-0 left-0 right-0 bg-white p-2 z-10 ${ + isMobile && + 'pb-8 pt-6 rounded-lg shadow-[rgba(0,0,4,0.1)_0px_-4px_4px_0px] ' + }`} id='price-section' > {!!activePrice && activePrice.price > 0 && ( |
