From 0e2ac6ec63944d8bebb123a862b18e337cbbbfbd Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 19 May 2023 16:39:28 +0700 Subject: Fix return null if no banner section --- src/lib/home/components/BannerSection.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/home/components') diff --git a/src/lib/home/components/BannerSection.jsx b/src/lib/home/components/BannerSection.jsx index 8459d08e..dfef071f 100644 --- a/src/lib/home/components/BannerSection.jsx +++ b/src/lib/home/components/BannerSection.jsx @@ -9,7 +9,8 @@ const BannerSection = () => { const bannerSection = useQuery('bannerSection', fetchBannerSection) return ( - bannerSection.data && ( + bannerSection.data && + bannerSection.data?.length > 0 && (
{bannerSection.data?.map((banner) => ( -- cgit v1.2.3