From 3d420f48f23b7851ec17528d2f1ef99b4cca910e Mon Sep 17 00:00:00 2001 From: Rama Priyanto Date: Wed, 18 Jun 2025 11:51:17 +0700 Subject: [PATCH] fix:date recap article --- components/landing/HeaderNews.tsx | 2 +- components/main/dashboard/dashboard-container.tsx | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/landing/HeaderNews.tsx b/components/landing/HeaderNews.tsx index 6cc1948..0dcc908 100644 --- a/components/landing/HeaderNews.tsx +++ b/components/landing/HeaderNews.tsx @@ -141,7 +141,7 @@ export default function HeaderNews() { src={ newsItem?.thumbnailUrl === "" ? "/no-image.jpg" - : newsItem?.thumbnailUrl + : newsItem?.thumbnailUrl + "?isBanner=true" } className={`!object-cover !rounded-none ${ portraitMap[index] diff --git a/components/main/dashboard/dashboard-container.tsx b/components/main/dashboard/dashboard-container.tsx index 3d9376f..36fd5dd 100644 --- a/components/main/dashboard/dashboard-container.tsx +++ b/components/main/dashboard/dashboard-container.tsx @@ -60,7 +60,7 @@ import { parseAbsoluteToLocal, } from "@internationalized/date"; import { Input } from "@heroui/input"; -import { EyeIconMdi } from "@/components/icons"; +import { EyeIconMdi, SearchIcons } from "@/components/icons"; type ArticleData = Article & { no: number; @@ -193,7 +193,7 @@ export default function DashboardContainer() { useEffect(() => { fetchPostCount(); - }, [postContentDate, selectedCategory]); + }, [selectedCategory]); async function fetchPostCount() { const getDate = (data: any) => { @@ -419,6 +419,7 @@ export default function DashboardContainer() {

{ e && setPostContentDate(e); @@ -434,6 +435,14 @@ export default function DashboardContainer() { }} size="sm" variant="bordered" + endContent={ + fetchPostCount()} + > + + + } />