From 617f920b5d60e989c08f8afd0e969d0d285b5a36 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 7 Aug 2024 09:36:36 +0700
Subject: <iman> add skeleton to banner promo homepage

---
 src/lib/home/components/PromotionProgram.jsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/lib/home/components/PromotionProgram.jsx')

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 '>
-- 
cgit v1.2.3

