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/modules/product-detail/components/PriceAction.tsx | |
| parent | 9abd621285d739a9c502d661013db5ce96edec33 (diff) | |
<iman> update mobile view
Diffstat (limited to 'src-migrate/modules/product-detail/components/PriceAction.tsx')
| -rw-r--r-- | src-migrate/modules/product-detail/components/PriceAction.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
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 && ( |
