design: 댓글 디자인 수정

This commit is contained in:
jhynsoo 2024-08-11 23:21:14 +09:00
parent 97bccbcd44
commit b82cfb51ae
4 changed files with 27 additions and 15 deletions

View File

@ -3,9 +3,7 @@
flex-direction: column;
gap: 8px;
width: 100%;
border: 1px solid var(--border-color);
border-radius: 16px;
padding: 12px 16px;
padding: 12px 0;
box-sizing: border-box;
}
@ -43,6 +41,7 @@
line-height: 1.4;
margin: 0;
color: var(--text-color);
word-break: break-word;
}
.input {

View File

@ -56,18 +56,22 @@ export default function FreeboardDetail({ topic, title, author, content, onDelet
<div>
<p className={styles.content}>{content}</p>
</div>
{comments &&
comments.map((comment) => (
<FreeboardComment
key={comment.id}
content={comment.content}
author={comment.name}
commentId={comment.id}
isMine={comment.mine}
onDeleteSubmit={refetch}
onEditSubmit={refetch}
/>
))}
{comments && (
<div className={styles.commentWrapper}>
{comments.map((comment) => (
<FreeboardComment
key={comment.id}
content={comment.content}
author={comment.name}
commentId={comment.id}
isMine={comment.mine}
onDeleteSubmit={refetch}
onEditSubmit={refetch}
/>
))}
</div>
)}
<FreeboardCommentInput onCommentSubmit={handleCommentSubmit} />
</div>
);

View File

@ -114,3 +114,11 @@
.delete {
color: var(--error-color);
}
.commentWrapper {
display: flex;
flex-direction: column;
border-top: 1px solid var(--border-color);
margin-top: 10px;
padding-top: 18px;
}

View File

@ -19,6 +19,7 @@
}
& > main {
min-width: 0;
width: 100%;
}
}