Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: fixed the incorrect link of the user who was replied in the comment

shuaif70996846332
diff --git a/ui/src/components/Comment/index.tsx b/ui/src/components/Comment/index.tsx
index 2a052e28..ec42c562 100644
--- a/ui/src/components/Comment/index.tsx
+++ b/ui/src/components/Comment/index.tsx
@@ -417,11 +417,18 @@ const Comment: FC<IProps> = ({ objectId, mode, commentId, children }) => {
/>
) : (
<div className="d-block">
- {item.reply_user_display_name && (
- <Link to="." className="small me-1 text-nowrap">
- @{item.reply_user_display_name}
- </Link>
- )}
+ {item.reply_user_display_name &&
+ (item.reply_user_status !== 'deleted' ? (
+ <Link
+ to={`/users/${item.reply_username}`}
+ className="small me-1 text-nowrap">
+ @{item.reply_user_display_name}
+ </Link>
+ ) : (
+ <span className="small me-1 text-nowrap">
+ @{item.reply_user_display_name}
+ </span>
+ ))}
<div
className="fmt small text-break text-wrap"