Skip to content

Commit 8570c20

Browse files
committed
feat: shows likes from post card
1 parent 5b029f0 commit 8570c20

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/components/common/FlatPostCard.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import RatioImage from './RatioImage';
1313
import media from '../../lib/styles/media';
1414
import PrivatePostLabel from './PrivatePostLabel';
1515
import optimizeImage from '../../lib/optimizeImage';
16+
import { LikeIcon } from '../../static/svg';
1617

1718
const PostCardBlock = styled.div`
1819
padding-top: 4rem;
@@ -106,6 +107,16 @@ const PostCardBlock = styled.div`
106107
margin-left: 0.5rem;
107108
margin-right: 0.5rem;
108109
}
110+
111+
.likes {
112+
display: flex;
113+
align-items: center;
114+
svg {
115+
width: 0.875rem;
116+
height: 0.875rem;
117+
margin-right: 0.25rem;
118+
}
119+
}
109120
}
110121
.tags-wrapper {
111122
margin-bottom: -0.875rem;
@@ -186,6 +197,11 @@ const FlatPostCard = ({ post, hideUser }: PostCardProps) => {
186197
<span>{formatDate(post.released_at)}</span>
187198
<div className="separator">·</div>
188199
<span>{post.comments_count}개의 댓글</span>
200+
<div className="separator">·</div>
201+
<span className="likes">
202+
<LikeIcon />
203+
{post.likes}
204+
</span>
189205
{post.is_private && (
190206
<>
191207
<div className="separator">·</div>

0 commit comments

Comments
 (0)