Barazo default frontend barazo.forum
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(web): display author avatar and name in topic cards

Shows avatar (or initial fallback), display name, and links to
user profile. Falls back to authorDid when author field is absent.
Part of P2.8.

+21 -1
+21 -1
src/components/topic-card.tsx
··· 41 41 {/* Metadata */} 42 42 <div className="flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground"> 43 43 {/* Author */} 44 - <span>{topic.authorDid}</span> 44 + <Link 45 + href={`/u/${topic.author?.handle ?? topic.authorDid}`} 46 + className="flex items-center gap-1.5 hover:text-foreground" 47 + > 48 + {topic.author?.avatarUrl ? ( 49 + <img 50 + src={topic.author.avatarUrl} 51 + alt="" 52 + className="h-5 w-5 rounded-full object-cover" 53 + loading="lazy" 54 + /> 55 + ) : ( 56 + <span 57 + className="flex h-5 w-5 items-center justify-center rounded-full bg-muted text-[10px] font-medium" 58 + aria-hidden="true" 59 + > 60 + {(topic.author?.displayName ?? topic.author?.handle ?? '?')[0]?.toUpperCase()} 61 + </span> 62 + )} 63 + <span>{topic.author?.displayName ?? topic.author?.handle ?? topic.authorDid}</span> 64 + </Link> 45 65 46 66 {/* Category */} 47 67 <Link