Skip to content

Commit 9792be4

Browse files
committed
refactor: update tag link
1 parent 687a5e1 commit 9792be4

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

client/src/components/ArticleList/index.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100

101101
header {
102102
display: flex;
103-
align-items: flex-start;
103+
align-items: center;
104104

105105
.title {
106106
overflow: hidden;

client/src/components/ArticleList/index.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,21 @@ export const ArticleList: React.FC<IProps> = ({ articles = [] }) => {
4646
<Link href={`/article/[id]`} as={`/article/${article.id}`} scroll={false}>
4747
<a aria-label={article.title} className={style.link}>
4848
<header>
49-
<div className={style.title} title={article.title}>{article.title}</div>
49+
<div className={style.title} title={article.title}>
50+
{article.title}
51+
</div>
5052
<div className={style.info}>
5153
{article.category && categoryIndex >= 0 && (
52-
<Tag className={style.antBadge} color={getColorFromNumber(categoryIndex)}>
53-
<FolderOutlined />
54-
<span className={style.category}>{article.category?.label}</span>
55-
</Tag>
54+
<Link
55+
href={`/category/${article?.category?.value}`}
56+
as={`/category/${article?.category?.value}`}
57+
scroll={false}
58+
>
59+
<Tag className={style.antBadge} color={getColorFromNumber(categoryIndex)}>
60+
<FolderOutlined />
61+
<span className={style.category}>{article.category?.label}</span>
62+
</Tag>
63+
</Link>
5664
)}
5765
</div>
5866
</header>

0 commit comments

Comments
 (0)