From ed583124f89e15cd65158836db1be34b9c868b18 Mon Sep 17 00:00:00 2001
From: Anang Yusman
+ {/*
{articleDetail?.slug}
-
AUTHOR
@@ -737,7 +760,7 @@ export default function DetailContent() {By {article.createdByName} —{" "} - {new Date(article.createdAt).toLocaleDateString("en-US", { - month: "long", - day: "numeric", - year: "numeric", - })} + {new Date(article.publishedAt).toLocaleDateString( + "en-US", + { + month: "long", + day: "numeric", + year: "numeric", + } + )}
- {new Date(post.createdAt).toLocaleDateString("en-US", { + {new Date(post.publishedAt).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric", diff --git a/components/landing-page/headers-health.tsx b/components/landing-page/headers-health.tsx index 1f2c973..5df440c 100644 --- a/components/landing-page/headers-health.tsx +++ b/components/landing-page/headers-health.tsx @@ -12,6 +12,8 @@ type Article = { categoryName: string; slug: string; createdAt: string; + + publishedAt: string; createdByName: string; thumbnailUrl: string; categories: { title: string }[]; @@ -92,11 +94,14 @@ export default function HeaderHealth() {
By {article.createdByName} —{" "} - {new Date(article.createdAt).toLocaleDateString("en-US", { - month: "long", - day: "numeric", - year: "numeric", - })} + {new Date(article.publishedAt).toLocaleDateString( + "en-US", + { + month: "long", + day: "numeric", + year: "numeric", + } + )}
- {new Date(post.createdAt).toLocaleDateString("en-US", { + {new Date(post.publishedAt).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric", diff --git a/components/landing-page/headers-narrative.tsx b/components/landing-page/headers-narrative.tsx index 9935f48..ba764e3 100644 --- a/components/landing-page/headers-narrative.tsx +++ b/components/landing-page/headers-narrative.tsx @@ -12,6 +12,7 @@ type Article = { slug: string; categoryName: string; createdAt: string; + publishedAt: string; createdByName: string; thumbnailUrl: string; categories: { title: string }[]; @@ -92,11 +93,14 @@ export default function HeaderNarrative() {
By {article.createdByName} —{" "} - {new Date(article.createdAt).toLocaleDateString("en-US", { - month: "long", - day: "numeric", - year: "numeric", - })} + {new Date(article.publishedAt).toLocaleDateString( + "en-US", + { + month: "long", + day: "numeric", + year: "numeric", + } + )}
- {new Date(post.createdAt).toLocaleDateString("en-US", { + {new Date(post.publishedAt).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric", diff --git a/components/landing-page/headers.tsx b/components/landing-page/headers.tsx index 1652a85..5971327 100644 --- a/components/landing-page/headers.tsx +++ b/components/landing-page/headers.tsx @@ -13,6 +13,7 @@ type Article = { categoryName: string; slug: string; createdAt: string; + publishedAt: string; createdByName: string; thumbnailUrl: string; categories: { @@ -93,7 +94,7 @@ export default function Beranda() {
- {new Date(item.createdAt).toLocaleDateString("id-ID", { + {new Date(item.publishedAt).toLocaleDateString("id-ID", { day: "2-digit", month: "long", year: "numeric",