Django/DRF + PostgreSQL/Redis/Celery backend with accounts, library, moments, and notifications apps; React/TypeScript/Vite frontend with Instagram-style sidebar nav, feed, profiles, nested comment replies, notifications, and photo/video upload with ffmpeg-generated posters. Co-Authored-By: Claude Sonnet 5 <[email protected]>
8 lines
276 B
TypeScript
8 lines
276 B
TypeScript
export function Avatar({ user }: { user: { username: string; avatar: string | null } }) {
|
|
return user.avatar ? (
|
|
<img src={user.avatar} alt={user.username} className="avatar" />
|
|
) : (
|
|
<span className="avatar">{user.username.slice(0, 1).toUpperCase()}</span>
|
|
)
|
|
}
|