fix: post/reply avatars not updating after avatar change

Feed, PostDetail and ReplyList rendered ui-avatars fallback from
username only, ignoring avatar_url from the posts/replies API. Now
use p.avatar_url / r.avatar_url when present.
This commit is contained in:
lezi-fun committed 2026-08-10 15:23:05 +08:00
1 parent d5e56c0a20
commit 599b6f3435
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -95,7 +95,7 @@ export default function PostDetail({ postId }) {
<div id="postDetailContent" style={{ maxWidth: 700, margin: '0 auto', width: '100%' }}>
<div className="post-detail-card">
<div className="post-header">
<img src={avatar(post.username)} className="post-avatar" alt="" />
<img src={post.avatar_url || avatar(post.username)} className="post-avatar" alt="" />
<span
className="post-username"
style={{ cursor: 'pointer', color: 'var(--primary)' }}