diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-08-08 08:08:25 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2024-08-08 08:08:25 +0000 |
| commit | 4b74228b697ba5a04e8b8850d769a676070df4ca (patch) | |
| tree | 9c3f7a653041223964a16807395dfef24a8a36e8 /src/pages | |
| parent | 6581712a87240394aea6504bfedb2bc2694e8f50 (diff) | |
| parent | 617f920b5d60e989c08f8afd0e969d0d285b5a36 (diff) | |
Merged in add-skeleton-allPromo (pull request #216)
<iman> add skeleton to banner promo homepage
Approved-by: trisusilo
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/index.jsx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 8af963fb..cad5d33b 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -9,6 +9,7 @@ import DesktopView from '@/core/components/views/DesktopView'; import MobileView from '@/core/components/views/MobileView'; import { FlashSaleSkeleton } from '@/lib/flashSale/skeleton/FlashSaleSkeleton'; import PreferredBrandSkeleton from '@/lib/home/components/Skeleton/PreferredBrandSkeleton'; +import BannerPromoSkeleton from '@/lib/home/components/Skeleton/BannerPromoSkeleton'; import PromotinProgram from '@/lib/promotinProgram/components/HomePage'; import PagePopupIformation from '~/modules/popup-information'; import useProductDetail from '~/modules/product-detail/stores/useProductDetail'; @@ -45,7 +46,10 @@ const FlashSale = dynamic( ); const ProgramPromotion = dynamic(() => - import('@/lib/home/components/PromotionProgram') + import('@/lib/home/components/PromotionProgram'), +{ + loading: () => <BannerPromoSkeleton />, +} ); const BannerSection = dynamic(() => @@ -113,7 +117,12 @@ export default function Home() { </div> {!auth?.feature?.soApproval && ( <> - <ProgramPromotion /> <FlashSale /> + <DelayRender renderAfter={200}> + <ProgramPromotion /> + </DelayRender> + <DelayRender renderAfter={200}> + <FlashSale /> + </DelayRender> </> )} <PromotinProgram /> |
