{formatMonthString(news?.updatedAt)}
+{formatMonthString(news?.createdAt)}
{`${new Date(news?.updatedAt) +
{`${new Date(news?.createdAt) .getHours() .toString() - .padStart(2, "0")}:${new Date(news?.updatedAt) + .padStart(2, "0")}:${new Date(news?.createdAt) .getMinutes() .toString() .padStart(2, "0")}`}
diff --git a/components/main/detail/new-detail.tsx b/components/main/detail/new-detail.tsx index aec025a..a359c82 100644 --- a/components/main/detail/new-detail.tsx +++ b/components/main/detail/new-detail.tsx @@ -24,13 +24,12 @@ export default function NewsDetailPage(props: { datas: any }) { const [articles, setArticles] = useState
- {textEllipsis(newsItem.title, 45)}
+ {articleMabes?.length < 1 ? (
+
+ {textEllipsis(newsItem.title, 45)}
+
+ {convertDateFormat(newsItem.createdAt)} WIB
- {convertDateFormat(newsItem.createdAt)} WIB
-
- {textEllipsis(newsItem.title, 45)}
+ {article?.length < 1 ? (
+
+ {textEllipsis(newsItem.title, 45)}
+
+ {convertDateFormat(newsItem.createdAt)} WIB
- {convertDateFormat(newsItem.createdAt)} WIB
-