Skip to content

Commit 9787993

Browse files
author
521xueweihan
committed
fix: comment bug
1 parent f02a728 commit 9787993

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/user/CommentList.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ const CommentList: React.FC<CommentListProps> = ({ uid, t, i18n_lang }) => {
8383
</div>
8484
{renderActionButtons(item)}
8585
</div>
86-
<CustomLink href={`/${item.belong}/${item.belong_id}`}>
86+
<CustomLink
87+
href={`/${item.belong}/${item.full_name || item.belong_id}`}
88+
>
8789
<CommentItem
8890
className='rounded-xl border bg-white p-4 hover:border-blue-500 dark:border-gray-700 dark:bg-gray-800 dark:hover:border-blue-500'
8991
key={item.cid}

src/types/repository.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ export interface CommentItemData {
136136
comment: string;
137137
/** 评论对应的开源项目 ID */
138138
belong_id: string;
139+
/** 评论对应的开源项目名称 */
140+
full_name?: string;
139141
/** 评论类别 */
140142
belong: 'repository' | 'article';
141143
/** 评论 ID */

0 commit comments

Comments
 (0)