From 6ece17db36fe86c91d560c2bc5921bf60d5b7694 Mon Sep 17 00:00:00 2001
From: FIN-IT_AndriFP <it@fixcomart.co.id>
Date: Fri, 17 Oct 2025 16:36:33 +0700
Subject: (andri) fix link + seq media berita

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

(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 6a0efbfe..7c587b23 100644
--- a/src/lib/home/components/MediaNews.jsx
+++ b/src/lib/home/components/MediaNews.jsx
@@ -16,7 +16,9 @@ const MediaNews = () => {
       setIsLoading(true);
       const res = await fetch(`/api/hero-banner?type=media-berita`);
       const result = await res.json();
-      setMedia(result.data || []);
+      const data = result.data || [];
+      data.sort((a, b) => (a.sequence || 0) - (b.sequence || 0));
+      setMedia(data);
     } catch (err) {
       console.error('Failed to load media:', err);
     } finally {
-- 
cgit v1.2.3

