summaryrefslogtreecommitdiff
path: root/src/lib/home/components/PromotionProgram.jsx
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-08-08 08:08:25 +0000
committertrisusilo <tri.susilo@altama.co.id>2024-08-08 08:08:25 +0000
commit4b74228b697ba5a04e8b8850d769a676070df4ca (patch)
tree9c3f7a653041223964a16807395dfef24a8a36e8 /src/lib/home/components/PromotionProgram.jsx
parent6581712a87240394aea6504bfedb2bc2694e8f50 (diff)
parent617f920b5d60e989c08f8afd0e969d0d285b5a36 (diff)
Merged in add-skeleton-allPromo (pull request #216)
<iman> add skeleton to banner promo homepage Approved-by: trisusilo
Diffstat (limited to 'src/lib/home/components/PromotionProgram.jsx')
-rw-r--r--src/lib/home/components/PromotionProgram.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/home/components/PromotionProgram.jsx b/src/lib/home/components/PromotionProgram.jsx
index 99258d94..c2f76069 100644
--- a/src/lib/home/components/PromotionProgram.jsx
+++ b/src/lib/home/components/PromotionProgram.jsx
@@ -3,11 +3,16 @@ import Image from 'next/image'
import { bannerApi } from '@/api/bannerApi';
import useDevice from '@/core/hooks/useDevice'
import { Swiper, SwiperSlide } from 'swiper/react';
+import BannerPromoSkeleton from '../components/Skeleton/BannerPromoSkeleton';
const { useQuery } = require('react-query')
const BannerSection = () => {
const promotionProgram = useQuery('promotionProgram', bannerApi({ type: 'banner-promotion' }));
const { isMobile, isDesktop } = useDevice()
+ if (promotionProgram.isLoading) {
+ return <BannerPromoSkeleton />;
+ }
+
return (
<div className='px-4 sm:px-0'>
<div className='flex justify-between items-center mb-4 '>