Renders the field that renames a user, on a profile's "manage" tab, which
those with user:manage see: users can't rename themselves.
f
UsernameField(unnamed 0: UsernameFieldProps): React.JSX.Element
Renders the name in a text input with a "Rename" button, which is enabled once the name differs.
I
UsernameFieldProps
Passed to UsernameField by ProfileManageTab.
-
save: (username: string) => Promise<string>
Sends the new name to
PATCH /api/users/:key/username, and resolves to the name the server kept. A refusal rejects with its message, which the field shows. - username: string
Usage
import * as mod from "src/components/profile/UsernameField.tsx";