Shows a user's role on their profile, and lets those who hold user:manage change it.

Functions

f
RoleChip(unnamed 0: { role: Role; }): React.JSX.Element | null

Renders the role badge next to the username in ProfileHeader, for moderators and admins only.

f
RoleSwitcher(unnamed 0: RoleSwitcherProps): React.JSX.Element

Renders the user's role as a Segmented whose clicks save it to PATCH /api/users/:id/role, which checks the permission again.

Interfaces

I
RoleSwitcherProps

Passed to RoleSwitcher by ProfileManageTab, which shows it only to those who hold user:manage, on another user's profile.