7.3 태그/카테고리 모델 및 UI o
This commit is contained in:
@@ -8,6 +8,7 @@ type Item = {
|
||||
isPinned: boolean;
|
||||
status: string;
|
||||
stat?: { recommendCount: number; views: number; commentsCount: number } | null;
|
||||
postTags?: { tag: { name: string; slug: string } }[];
|
||||
};
|
||||
|
||||
type Resp = {
|
||||
@@ -65,6 +66,13 @@ export function PostList({ boardId, sort = "recent", q, tag, author, start, end
|
||||
<div style={{ fontSize: 12, opacity: 0.8 }}>
|
||||
추천 {p.stat?.recommendCount ?? 0} · 조회 {p.stat?.views ?? 0} · 댓글 {p.stat?.commentsCount ?? 0}
|
||||
</div>
|
||||
{!!p.postTags?.length && (
|
||||
<div style={{ marginTop: 6, display: "flex", gap: 6, flexWrap: "wrap", fontSize: 12 }}>
|
||||
{p.postTags?.map((pt) => (
|
||||
<a key={pt.tag.slug} href={`/search?tag=${pt.tag.slug}`}>#{pt.tag.name}</a>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user