From 2d1911b55f2e58c89e8260a878db815352fc4e33 Mon Sep 17 00:00:00 2001 From: Anang Yusman Date: Fri, 21 Nov 2025 17:52:09 +0800 Subject: [PATCH] update --- components/details/details-content.tsx | 27 +++++++++++++++--------- components/landing-page/development.tsx | 3 ++- components/landing-page/header.tsx | 5 +++-- components/landing-page/health.tsx | 3 ++- components/landing-page/latest-news.tsx | 3 ++- components/landing-page/opinion-news.tsx | 3 ++- 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/components/details/details-content.tsx b/components/details/details-content.tsx index c7e52b1..912205d 100644 --- a/components/details/details-content.tsx +++ b/components/details/details-content.tsx @@ -30,6 +30,7 @@ type Article = { htmlDescription: string; categoryName: string; createdAt: string; + publishedAt: string; createdByName: string; customCreatorName: string; thumbnailUrl: string; @@ -808,11 +809,14 @@ export default function DetailContent() { {item.title}

- {new Date(item.createdAt).toLocaleDateString("id-ID", { - day: "2-digit", - month: "long", - year: "numeric", - })} + {new Date(item.publishedAt).toLocaleDateString( + "id-ID", + { + day: "2-digit", + month: "long", + year: "numeric", + } + )}

@@ -837,11 +841,14 @@ export default function DetailContent() { {item.title}

- {new Date(item.createdAt).toLocaleDateString("id-ID", { - day: "2-digit", - month: "long", - year: "numeric", - })} + {new Date(item.publishedAt).toLocaleDateString( + "id-ID", + { + day: "2-digit", + month: "long", + year: "numeric", + } + )}

diff --git a/components/landing-page/development.tsx b/components/landing-page/development.tsx index 8bca529..af8745b 100644 --- a/components/landing-page/development.tsx +++ b/components/landing-page/development.tsx @@ -11,6 +11,7 @@ type Article = { categoryName: string; slug: string; createdAt: string; + publishedAt: string; createdByName: string; customCreatorName: string; thumbnailUrl: string; @@ -111,7 +112,7 @@ export default function Development() {

- {new Date(item.createdAt).toLocaleDateString("id-ID", { + {new Date(item.publishedAt).toLocaleDateString("id-ID", { day: "numeric", month: "long", year: "numeric", diff --git a/components/landing-page/header.tsx b/components/landing-page/header.tsx index 50fc79f..4f78c7d 100644 --- a/components/landing-page/header.tsx +++ b/components/landing-page/header.tsx @@ -13,6 +13,7 @@ type Article = { createdAt: string; slug: string; createdByName: string; + publishedAt: string; customCreatorName: string; thumbnailUrl: string; categories: { title: string }[]; @@ -143,7 +144,7 @@ export default function Header() { - {new Date(mainArticle.createdAt).toLocaleDateString( + {new Date(mainArticle.publishedAt).toLocaleDateString( "id-ID", { day: "2-digit", @@ -189,7 +190,7 @@ export default function Header() { {item.title}

- {new Date(item.createdAt).toLocaleDateString("id-ID", { + {new Date(item.publishedAt).toLocaleDateString("id-ID", { day: "2-digit", month: "long", year: "numeric", diff --git a/components/landing-page/health.tsx b/components/landing-page/health.tsx index 07f9874..7d72ef4 100644 --- a/components/landing-page/health.tsx +++ b/components/landing-page/health.tsx @@ -11,6 +11,7 @@ type Article = { description: string; categoryName: string; createdAt: string; + publishedAt: string; slug: string; createdByName: string; customCreatorName?: string; @@ -97,7 +98,7 @@ export default function NewsTerkini() { {/* AUTHOR + DATE */}

By {item.customCreatorName || item.createdByName} —{" "} - {formatDate(item.createdAt)} + {formatDate(item.publishedAt)}

diff --git a/components/landing-page/latest-news.tsx b/components/landing-page/latest-news.tsx index 7e50705..b01a2d1 100644 --- a/components/landing-page/latest-news.tsx +++ b/components/landing-page/latest-news.tsx @@ -13,6 +13,7 @@ type Article = { categoryName: string; slug: string; createdAt: string; + publishedAt: string; createdByName: string; customCreatorName: string; thumbnailUrl: string; @@ -99,7 +100,7 @@ export default function News() { - - {new Date(item.createdAt).toLocaleDateString("id-ID", { + {new Date(item.publishedAt).toLocaleDateString("id-ID", { day: "numeric", month: "long", year: "numeric", diff --git a/components/landing-page/opinion-news.tsx b/components/landing-page/opinion-news.tsx index 8e76e72..90edd40 100644 --- a/components/landing-page/opinion-news.tsx +++ b/components/landing-page/opinion-news.tsx @@ -13,6 +13,7 @@ type Article = { categoryName: string; slug: string; createdAt: string; + publishedAt: string; createdByName: string; customCreatorName: string; thumbnailUrl: string; @@ -99,7 +100,7 @@ export default function OpinionNews() { - - {new Date(item.createdAt).toLocaleDateString("id-ID", { + {new Date(item.publishedAt).toLocaleDateString("id-ID", { day: "numeric", month: "long", year: "numeric",