diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2024-07-02 10:40:06 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2024-07-02 10:40:06 +0700 |
| commit | 556cbc1e5ea1c1ef0170c9a1b8f470a3d92d888e (patch) | |
| tree | 61677a0ba6b76412ec3af0d0a2e91babe0d8cf5d /src/pages/index.jsx | |
| parent | d1f70e37fdea0d677cedccec9effdbeeb91656aa (diff) | |
IS SO APPROVAL
Diffstat (limited to 'src/pages/index.jsx')
| -rw-r--r-- | src/pages/index.jsx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/pages/index.jsx b/src/pages/index.jsx index c097530c..914fb266 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -11,6 +11,8 @@ import { FlashSaleSkeleton } from '@/lib/flashSale/skeleton/FlashSaleSkeleton'; import PreferredBrandSkeleton from '@/lib/home/components/Skeleton/PreferredBrandSkeleton'; import PromotinProgram from '@/lib/promotinProgram/components/HomePage'; import PagePopupIformation from '~/modules/popup-information'; +import useProductDetail from '~/modules/product-detail/stores/useProductDetail'; +import { getAuth } from '~/libs/auth'; const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout') @@ -56,6 +58,8 @@ export default function Home() { const bannerRef = useRef(null); const wrapperRef = useRef(null); + const auth = getAuth(); + const handleOnLoad = () => { wrapperRef.current.style.height = bannerRef.current?.querySelector(':first-child')?.clientHeight + 'px'; @@ -102,7 +106,7 @@ export default function Home() { <div id='flashsale'> <PreferredBrand /> </div> - <FlashSale /> + {!auth?.feature?.soApproval && <FlashSale />} <PromotinProgram /> <CategoryHomeId /> <BannerSection /> @@ -124,9 +128,11 @@ export default function Home() { <PreferredBrand /> </div> </DelayRender> - <DelayRender renderAfter={600}> - <FlashSale /> - </DelayRender> + {!auth?.feature?.soApproval && ( + <DelayRender renderAfter={600}> + <FlashSale /> + </DelayRender> + )} <DelayRender renderAfter={600}> <PromotinProgram /> </DelayRender> |
