diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-08-16 11:55:50 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-08-16 11:55:50 +0700 |
| commit | 6d3b7a1744b6be3474f52ee3e0270963ecadd24b (patch) | |
| tree | c1ba02c9113c373b20aaa1210c8c11a2720b3e9d | |
| parent | b22c0e52dc08083025330ef0a501e085cbf434df (diff) | |
<iman> update
| -rw-r--r-- | src-migrate/pages/shop/promo/index.tsx | 1 | ||||
| -rw-r--r-- | src/lib/flashSale/components/FlashSale.jsx | 63 |
2 files changed, 33 insertions, 31 deletions
diff --git a/src-migrate/pages/shop/promo/index.tsx b/src-migrate/pages/shop/promo/index.tsx index 2ebfc008..a27cc855 100644 --- a/src-migrate/pages/shop/promo/index.tsx +++ b/src-migrate/pages/shop/promo/index.tsx @@ -24,7 +24,6 @@ const PromoPage = () => { /> <PromoList selectedPromo={selectedPromo} /> </LazyLoadComponent> - <h1 className='sm:h-1'></h1> <LazyLoadComponent> <FlashSale /> </LazyLoadComponent> diff --git a/src/lib/flashSale/components/FlashSale.jsx b/src/lib/flashSale/components/FlashSale.jsx index 5be6d4e3..85afb818 100644 --- a/src/lib/flashSale/components/FlashSale.jsx +++ b/src/lib/flashSale/components/FlashSale.jsx @@ -26,38 +26,41 @@ const FlashSale = () => { } return ( - flashSales?.length > 0 && ( - <div className='px-4 sm:px-0 grid grid-cols-1 gap-y-8'> - {flashSales.map((flashSale, index) => ( - <div key={index}> - <div className='flex gap-x-3 mb-4 justify-between sm:justify-start'> - <div className='font-medium sm:text-h-lg mt-1.5'> - {flashSale.name} + <div className='sm:mt-4'> + {flashSales?.length > 0 && ( + <div className='px-4 sm:px-0 grid grid-cols-1 gap-y-8 sm:mt-4'> + {flashSales.map((flashSale, index) => ( + <div key={index}> + <div className='flex gap-x-3 mb-4 justify-between sm:justify-start'> + <div className='font-medium sm:text-h-lg mt-1.5'> + {flashSale.name} + </div> + <CountDown initialTime={flashSale.duration} /> + </div> + + <div className='relative'> + <Image + src={flashSale.banner} + alt={flashSale.name} + width={1080} + height={192} + className='w-full rounded mb-4 hidden sm:block' + /> + <Image + src={flashSale.bannerMobile} + alt={flashSale.name} + width={256} + height={48} + className='w-full rounded mb-4 block sm:hidden' + /> + <FlashSaleProduct flashSaleId={flashSale.pricelistId} /> </div> - <CountDown initialTime={flashSale.duration} /> - </div> - - <div className='relative'> - <Image - src={flashSale.banner} - alt={flashSale.name} - width={1080} - height={192} - className='w-full rounded mb-4 hidden sm:block' - /> - <Image - src={flashSale.bannerMobile} - alt={flashSale.name} - width={256} - height={48} - className='w-full rounded mb-4 block sm:hidden' - /> - <FlashSaleProduct flashSaleId={flashSale.pricelistId} /> </div> - </div> - ))} - </div> - ) + ))} + </div> + )} + + </div> ); }; |
