From b8af83fe38d7eba0f19c84476984990376231995 Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Mon, 13 Oct 2025 16:42:21 +0800 Subject: [PATCH] update --- components/details/details-content.tsx | 86 +++++++++++++++----------- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/components/details/details-content.tsx b/components/details/details-content.tsx index a0f2979..dd18a76 100644 --- a/components/details/details-content.tsx +++ b/components/details/details-content.tsx @@ -305,13 +305,13 @@ export default function DetailContent() { close(); } - if (!articleDetail?.files || articleDetail.files.length === 0) { - return ( -
-

Gambar tidak tersedia

-
- ); - } + // if (!articleDetail?.files || articleDetail.files.length === 0) { + // return ( + //
+ //

Gambar tidak tersedia

+ //
+ // ); + // } return ( <> @@ -364,38 +364,50 @@ export default function DetailContent() {
{/* Gambar utama */} -
- {articleDetail.files[selectedIndex].fileAlt -
- - {/* Thumbnail */} -
- {articleDetail.files.map((file: any, index: number) => ( - - ))} -
+
+ + {/* Thumbnail */} +
+ {articleDetail.files.map((file: any, index: number) => ( + + ))} +
+ + ) : ( + // Jika file kosong/null tapi tetap render data lainnya +
+

Gambar tidak tersedia

+
+ )} {/* Slug */}