This commit is contained in:
Anang Yusman 2025-11-21 17:52:09 +08:00
parent 4b4daff863
commit 2d1911b55f
6 changed files with 28 additions and 16 deletions

View File

@ -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}
</p>
<p className="text-xs text-gray-500 mt-1">
{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",
}
)}
</p>
</div>
</div>
@ -837,11 +841,14 @@ export default function DetailContent() {
{item.title}
</p>
<p className="text-xs text-gray-500 mt-1">
{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",
}
)}
</p>
</div>
</div>

View File

@ -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() {
</p>
<p className="text-[11px] text-gray-600">
{new Date(item.createdAt).toLocaleDateString("id-ID", {
{new Date(item.publishedAt).toLocaleDateString("id-ID", {
day: "numeric",
month: "long",
year: "numeric",

View File

@ -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() {
</span>
<span></span>
<span>
{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}
</p>
<span className="text-xs text-gray-500 mt-1">
{new Date(item.createdAt).toLocaleDateString("id-ID", {
{new Date(item.publishedAt).toLocaleDateString("id-ID", {
day: "2-digit",
month: "long",
year: "numeric",

View File

@ -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 */}
<p className="text-xs text-gray-400 mt-2">
By {item.customCreatorName || item.createdByName} {" "}
{formatDate(item.createdAt)}
{formatDate(item.publishedAt)}
</p>
</div>
<div className="relative w-40 h-28 rounded overflow-hidden flex-shrink-0">

View File

@ -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() {
</span>
<span className="text-yellow-500">-</span>
<span>
{new Date(item.createdAt).toLocaleDateString("id-ID", {
{new Date(item.publishedAt).toLocaleDateString("id-ID", {
day: "numeric",
month: "long",
year: "numeric",

View File

@ -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() {
</span>
<span className="text-yellow-500">-</span>
<span>
{new Date(item.createdAt).toLocaleDateString("id-ID", {
{new Date(item.publishedAt).toLocaleDateString("id-ID", {
day: "numeric",
month: "long",
year: "numeric",