From 5286e590ec5cac17c1d8547b50e6c4d52ba6cf31 Mon Sep 17 00:00:00 2001 From: Jeongmin Oh Date: Sun, 18 Aug 2024 23:18:47 +0900 Subject: [PATCH] =?UTF-8?q?design:=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=94=94?= =?UTF-8?q?=EC=9E=90=EC=9D=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/AddComment.tsx | 12 ++++---- components/AllArticleList/AllArticle.tsx | 5 ++-- components/CommentList/Comment.tsx | 26 +++++++++++++---- components/DetailArticle.tsx | 36 ++++++++++++++---------- pages/board/[id].tsx | 8 ++++-- 5 files changed, 57 insertions(+), 30 deletions(-) diff --git a/components/AddComment.tsx b/components/AddComment.tsx index 9f0659ccf..24fdeeee3 100644 --- a/components/AddComment.tsx +++ b/components/AddComment.tsx @@ -69,11 +69,13 @@ function AddComment({ id, setCommentList }: AddCommentProps) { /> ); })} - +
+ +
); } diff --git a/components/AllArticleList/AllArticle.tsx b/components/AllArticleList/AllArticle.tsx index 120ac11cf..bf830fe76 100644 --- a/components/AllArticleList/AllArticle.tsx +++ b/components/AllArticleList/AllArticle.tsx @@ -8,6 +8,7 @@ import Image from "next/image"; import profileImage from "@/assets/images/img_profile.png"; import likeIconFull from "@/assets/images/ic_heart_full.png"; import likeIconEmpty from "@/assets/images/ic_heart_empty.png"; +import defaultProductImage from "@/assets/images/img_product_empty.png"; interface AllArticleProps { article: Article; @@ -15,8 +16,8 @@ interface AllArticleProps { function AllArticle({ article }: AllArticleProps) { const { id, title, image, writer, likeCount, createdAt } = article; - const [isLikeClicked, setIsLikeClicked] = useState(false); + const productImage = image || defaultProductImage; const handleLikeButtonClick = () => { setIsLikeClicked((prevIsLikeClicked) => !prevIsLikeClicked); @@ -28,7 +29,7 @@ function AllArticle({ article }: AllArticleProps) {

{title}

상품 이미지 -
{content}
-
+
+
+
{content}
+ +
+
-
-
{writer.nickname}
-
{timeElapsed}
+
+
+ {writer.nickname} +
+
{timeElapsed}
diff --git a/components/DetailArticle.tsx b/components/DetailArticle.tsx index efc5bda06..e8788542a 100644 --- a/components/DetailArticle.tsx +++ b/components/DetailArticle.tsx @@ -24,13 +24,15 @@ function DetailArticle({ article }: DetailArticleProps) {
-

{title}

- 케밥 메뉴 아아콘 +

{title}

+
@@ -41,24 +43,28 @@ function DetailArticle({ article }: DetailArticleProps) { height={40} />
-
{writer.nickname || "Anonymous"}
-
{formatDate(createdAt)}
+
+ {writer.nickname || "Anonymous"} +
+
+ {formatDate(createdAt)} +
-
- -
{likeCount}
-
+
{likeCount}
+
+
-

{content}

+

{content}

); } diff --git a/pages/board/[id].tsx b/pages/board/[id].tsx index 8491812a8..20d18fe69 100644 --- a/pages/board/[id].tsx +++ b/pages/board/[id].tsx @@ -44,8 +44,12 @@ function DetailBoard({ return (
- - +
+ +
+
+ +