Skip to content

Commit

Permalink
design: 댓글이 없는 경우 보이는 메시지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ojm51 committed Aug 18, 2024
1 parent 5286e59 commit 7a69714
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
9 changes: 6 additions & 3 deletions components/CommentList/CommentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface CommentListProps {

function CommentList({ commentList: comments }: CommentListProps) {
return (
<div className="inquiry-wrapper">
<div>
{!!comments.length ? (
<ul className="comment-lists">
{comments.map((comment: IComment) => (
Expand All @@ -20,14 +20,17 @@ function CommentList({ commentList: comments }: CommentListProps) {
))}
</ul>
) : (
<div className="no-inquiry-wrapper">
// TODO: EmptyContent 컴포넌트 빼내기 가능
<div className="flex flex-col items-center justify-center">
<Image
src={replayEmptyImage}
alt="아직 문의가 없습니다"
width={200}
height={200}
/>
<div className="no-inquiry-text">아직 문의가 없습니다.</div>
<div className="text-base font-normal text-gray-400">
아직 문의가 없습니다.
</div>
</div>
)}
</div>
Expand Down
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
const nextConfig = {
reactStrictMode: true,
images: {
domains: ["sprint-fe-project.s3.ap-northeast-2.amazonaws.com"],
domains: [
"sprint-fe-project.s3.ap-northeast-2.amazonaws.com",
"flexible.img.hani.co.kr",
],
},
};

Expand Down
4 changes: 3 additions & 1 deletion pages/board/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ function DetailBoard({
<div className="mb-10">
<AddComment id={id} setCommentList={setCommentList} />
</div>
<CommentList commentList={commentList} />
<div className="flex items-center justify-center">
<CommentList commentList={commentList} />
</div>
<ReturnButton href="/boards" text="목록으로 돌아가기" />
</div>
);
Expand Down

0 comments on commit 7a69714

Please sign in to comment.