From 88c83840d9934daff813c532f47bd35723a74021 Mon Sep 17 00:00:00 2001 From: Jungu Lee <1zzangjun@gmail.com> Date: Tue, 7 Nov 2023 00:46:52 +0900 Subject: [PATCH] =?UTF-8?q?Refactor=20:=20=EC=8B=A0=EA=B7=9C=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/post/PostCard.tsx | 142 +++++++++++++++--------- 1 file changed, 91 insertions(+), 51 deletions(-) diff --git a/client/src/components/post/PostCard.tsx b/client/src/components/post/PostCard.tsx index c5e382b..16a5f15 100644 --- a/client/src/components/post/PostCard.tsx +++ b/client/src/components/post/PostCard.tsx @@ -1,19 +1,15 @@ "use client"; import { PostInterface } from "@/types/post/PostInterface"; -import { - FavoriteOutlined, - MoreVertOutlined, - ShareOutlined, -} from "@mui/icons-material"; +import { MoreVertOutlined } from "@mui/icons-material"; import { Avatar, + Box, Card, CardActions, CardContent, - CardHeader, CardMedia, - IconButton, Typography, + ButtonBase, } from "@mui/material"; const PostCard = ({ @@ -23,54 +19,98 @@ const PostCard = ({ nickname, content, userImage, + tags, }: PostInterface) => { return ( - - {/* Header */} - + + {userImage || userId[0].toUpperCase()} + + + {/* Header */} + + - {userImage || userId[0].toUpperCase()} - - } - action={ - + {nickname} + {`@${userId}`} + {createdAt} + + + - - } - title={`@${userId}`} - subheader={nickname} - /> - {/* image */} - {image.length !== 0 && ( - - )} - {/* Contents */} - - - {content} - - - {/* CTA */} - - - - - - - - + + + + {/* Contents */} + + {content} + {/* Hash tags */} + {tags?.length > 0 && ( + + {tags.map((tag, i) => ( + + {`#${tag}`} + + ))} + + )} + + {/* image */} + {image.length !== 0 && ( + + )} + {/* CTA */} + + + 댓글 + + + 좋아요 + + + 공유하기 + + + ); };