Skip to content

Commit

Permalink
[Feat] 홈페이지와 프로필페이지 게시글 일부분만 노출시키도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
BangDori committed Aug 17, 2023
1 parent 113bab6 commit dc4203a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/home/post/PostItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ const PostItem = ({ post }) => {
</div>
{isLink && (
<Link to={`/${id}`}>
<div className='content'>{formattedContent}</div>
<div className='content'>
{content.replace(/\\r\\n/g, ' ').slice(0, 360)}

<p style={{ margin: '16px 0 0' }}>
{content.length >= 360 && '더보기.....'}
</p>
</div>
</Link>
)}
{!isLink && <div className='content'>{formattedContent}</div>}
Expand Down

0 comments on commit dc4203a

Please sign in to comment.