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; htmlDescription: string;
categoryName: string; categoryName: string;
createdAt: string; createdAt: string;
publishedAt: string;
createdByName: string; createdByName: string;
customCreatorName: string; customCreatorName: string;
thumbnailUrl: string; thumbnailUrl: string;
@ -808,11 +809,14 @@ export default function DetailContent() {
{item.title} {item.title}
</p> </p>
<p className="text-xs text-gray-500 mt-1"> <p className="text-xs text-gray-500 mt-1">
{new Date(item.createdAt).toLocaleDateString("id-ID", { {new Date(item.publishedAt).toLocaleDateString(
day: "2-digit", "id-ID",
month: "long", {
year: "numeric", day: "2-digit",
})} month: "long",
year: "numeric",
}
)}
</p> </p>
</div> </div>
</div> </div>
@ -837,11 +841,14 @@ export default function DetailContent() {
{item.title} {item.title}
</p> </p>
<p className="text-xs text-gray-500 mt-1"> <p className="text-xs text-gray-500 mt-1">
{new Date(item.createdAt).toLocaleDateString("id-ID", { {new Date(item.publishedAt).toLocaleDateString(
day: "2-digit", "id-ID",
month: "long", {
year: "numeric", day: "2-digit",
})} month: "long",
year: "numeric",
}
)}
</p> </p>
</div> </div>
</div> </div>

View File

@ -11,6 +11,7 @@ type Article = {
categoryName: string; categoryName: string;
slug: string; slug: string;
createdAt: string; createdAt: string;
publishedAt: string;
createdByName: string; createdByName: string;
customCreatorName: string; customCreatorName: string;
thumbnailUrl: string; thumbnailUrl: string;
@ -111,7 +112,7 @@ export default function Development() {
</p> </p>
<p className="text-[11px] text-gray-600"> <p className="text-[11px] text-gray-600">
{new Date(item.createdAt).toLocaleDateString("id-ID", { {new Date(item.publishedAt).toLocaleDateString("id-ID", {
day: "numeric", day: "numeric",
month: "long", month: "long",
year: "numeric", year: "numeric",

View File

@ -13,6 +13,7 @@ type Article = {
createdAt: string; createdAt: string;
slug: string; slug: string;
createdByName: string; createdByName: string;
publishedAt: string;
customCreatorName: string; customCreatorName: string;
thumbnailUrl: string; thumbnailUrl: string;
categories: { title: string }[]; categories: { title: string }[];
@ -143,7 +144,7 @@ export default function Header() {
</span> </span>
<span></span> <span></span>
<span> <span>
{new Date(mainArticle.createdAt).toLocaleDateString( {new Date(mainArticle.publishedAt).toLocaleDateString(
"id-ID", "id-ID",
{ {
day: "2-digit", day: "2-digit",
@ -189,7 +190,7 @@ export default function Header() {
{item.title} {item.title}
</p> </p>
<span className="text-xs text-gray-500 mt-1"> <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", day: "2-digit",
month: "long", month: "long",
year: "numeric", year: "numeric",

View File

@ -11,6 +11,7 @@ type Article = {
description: string; description: string;
categoryName: string; categoryName: string;
createdAt: string; createdAt: string;
publishedAt: string;
slug: string; slug: string;
createdByName: string; createdByName: string;
customCreatorName?: string; customCreatorName?: string;
@ -97,7 +98,7 @@ export default function NewsTerkini() {
{/* AUTHOR + DATE */} {/* AUTHOR + DATE */}
<p className="text-xs text-gray-400 mt-2"> <p className="text-xs text-gray-400 mt-2">
By {item.customCreatorName || item.createdByName} {" "} By {item.customCreatorName || item.createdByName} {" "}
{formatDate(item.createdAt)} {formatDate(item.publishedAt)}
</p> </p>
</div> </div>
<div className="relative w-40 h-28 rounded overflow-hidden flex-shrink-0"> <div className="relative w-40 h-28 rounded overflow-hidden flex-shrink-0">

View File

@ -13,6 +13,7 @@ type Article = {
categoryName: string; categoryName: string;
slug: string; slug: string;
createdAt: string; createdAt: string;
publishedAt: string;
createdByName: string; createdByName: string;
customCreatorName: string; customCreatorName: string;
thumbnailUrl: string; thumbnailUrl: string;
@ -99,7 +100,7 @@ export default function News() {
</span> </span>
<span className="text-yellow-500">-</span> <span className="text-yellow-500">-</span>
<span> <span>
{new Date(item.createdAt).toLocaleDateString("id-ID", { {new Date(item.publishedAt).toLocaleDateString("id-ID", {
day: "numeric", day: "numeric",
month: "long", month: "long",
year: "numeric", year: "numeric",

View File

@ -13,6 +13,7 @@ type Article = {
categoryName: string; categoryName: string;
slug: string; slug: string;
createdAt: string; createdAt: string;
publishedAt: string;
createdByName: string; createdByName: string;
customCreatorName: string; customCreatorName: string;
thumbnailUrl: string; thumbnailUrl: string;
@ -99,7 +100,7 @@ export default function OpinionNews() {
</span> </span>
<span className="text-yellow-500">-</span> <span className="text-yellow-500">-</span>
<span> <span>
{new Date(item.createdAt).toLocaleDateString("id-ID", { {new Date(item.publishedAt).toLocaleDateString("id-ID", {
day: "numeric", day: "numeric",
month: "long", month: "long",
year: "numeric", year: "numeric",