Renders a user's avatar, or their initial, wherever a user is named: cards, comments, chat, profiles and mention suggestions.

Functions

f
Avatar(unnamed 0: AvatarProps): React.JSX.Element

Renders the image from GET /api/users/:userId/avatar, scaled by the server to the size it is shown at, or the user's initial when they have none or it fails to load. An avatar added, changed or removed since the caller's data was fetched shows at once, through the user_updated messages that WSProvider puts in AvatarOverrideContext.

Interfaces

I
AvatarProps

Passed to Avatar from whatever data the caller has on the user, which may be stale: a live override from AvatarOverrideContext wins over hasAvatar and version.