From 2144e42fccf08f6c10713f1966cb439026fef7b7 Mon Sep 17 00:00:00 2001 From: bae-sh Date: Wed, 3 Jan 2024 20:43:01 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20=EB=B0=8F=20=EC=A2=8B=EC=95=84=EC=9A=94=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/board/PostDetail/index.tsx | 2 +- client/src/components/common/Post/PostSummary/index.tsx | 2 +- client/src/types/index.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/components/board/PostDetail/index.tsx b/client/src/components/board/PostDetail/index.tsx index e56b73e5..ab895be6 100644 --- a/client/src/components/board/PostDetail/index.tsx +++ b/client/src/components/board/PostDetail/index.tsx @@ -81,7 +81,7 @@ export default function PostDetail({ data, IS_AUTHOR }: PostDetail) {

{parseDate(data?.postCreatedAt)}


-

좋아요 0 | 조회 0

+

{`좋아요 ${data.likes} | 조회 ${data.hits}`}

); } diff --git a/client/src/components/common/Post/PostSummary/index.tsx b/client/src/components/common/Post/PostSummary/index.tsx index 2af81f68..48de1b5c 100644 --- a/client/src/components/common/Post/PostSummary/index.tsx +++ b/client/src/components/common/Post/PostSummary/index.tsx @@ -46,7 +46,7 @@ export function PostSummary({ />
-

좋아요 0 | 조회 0

+

{`좋아요 ${postInfoData.likes} | 조회 ${postInfoData.hits}`}

{parseDate(postInfoData?.postCreatedAt)}

diff --git a/client/src/types/index.ts b/client/src/types/index.ts index 5b025d24..42e7f6d0 100644 --- a/client/src/types/index.ts +++ b/client/src/types/index.ts @@ -20,6 +20,8 @@ export interface IPostInformation { postTitle: string; postType: string; postUpdatedAt: string; + hits: number; + likes: number; } export interface IBoardPostInformation