Skip to content

Commit 3523795

Browse files
authored
Merge pull request velopert#24 from velopert/feature/comment-markdown-render
Adds markdown render on comment item
2 parents dd83261 + 1125635 commit 3523795

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/post/PostCommentItem.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import PostRepliesContainer from '../../containers/post/PostRepliesContainer';
1111
import PostEditComment from '../../containers/post/PostEditComment';
1212
import media from '../../lib/styles/media';
1313
import { Link } from 'react-router-dom';
14+
import MarkdownRender from '../common/MarkdownRender';
1415

1516
const PostCommentItemBlock = styled.div`
1617
padding-top: 1.5rem;
@@ -90,6 +91,14 @@ const CommentHead = styled.div`
9091
`;
9192

9293
const CommentText = styled.p<{ deleted: boolean }>`
94+
h1,
95+
h2 {
96+
font-size: 1.75rem;
97+
${media.small} {
98+
font-size: 1.5rem;
99+
}
100+
}
101+
93102
${props =>
94103
props.deleted &&
95104
css`
@@ -188,7 +197,7 @@ const PostCommentItem: React.FC<PostCommentItemProps> = ({
188197
) : (
189198
<Typography>
190199
<CommentText deleted={deleted}>
191-
{text || '삭제된 댓글입니다.'}
200+
<MarkdownRender markdown={text || '삭제된 댓글입니다.'} />
192201
</CommentText>
193202
</Typography>
194203
)}

0 commit comments

Comments
 (0)