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
@@ -85,7 +85,7 @@ export default function Feed({ onOpenModal, onReport }) {
<div style={{ fontSize: 12, color: 'var(--primary)', fontWeight: 600, marginBottom: 4 }}>📌 置顶</div>
)}
<div className="post-header">
<img src={avatar(p.username)} className="post-avatar" alt="" />
<img src={p.avatar_url || avatar(p.username)} className="post-avatar" alt="" />
<span
className="post-username"
style={{ cursor: 'pointer', color: 'var(--primary)' }}