From 9fa82a1c56e6e1628ef5a255ba3f66fb6aec83ec Mon Sep 17 00:00:00 2001
From: "Indoteknik ." <andrifebriyadiputra@gmail.com>
Date: Mon, 25 Aug 2025 16:07:26 +0700
Subject: (andri) tidak render media jika tidak ada data

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

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

diff --git a/src/lib/home/components/MediaNews.jsx b/src/lib/home/components/MediaNews.jsx
index 528fbe7c..6a0efbfe 100644
--- a/src/lib/home/components/MediaNews.jsx
+++ b/src/lib/home/components/MediaNews.jsx
@@ -42,6 +42,10 @@ const MediaNews = () => {
 
   const shouldUseSlider = isMobile || (isDesktop && preferredMediaData.length > 8);
 
+  if (!isLoading && preferredMediaData.length === 0) {
+    return null;
+  }
+
   return (
     <div className="px-4 sm:px-0">
       <div className="flex justify-between items-center mb-4">
-- 
cgit v1.2.3

