forked from github/cinny
Update command strings
This commit is contained in:
@@ -20,7 +20,6 @@ function ProfileEditor({ userId }) {
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
const mx = initMatrix.matrixClient;
|
||||
const user = mx.getUser(mx.getUserId());
|
||||
const fallbackUsername = userId.match(/^@?(\S+):(\S+)$/)[1];
|
||||
|
||||
const displayNameRef = useRef(null);
|
||||
const [avatarSrc, setAvatarSrc] = useState(user.avatarUrl ? mx.mxcUrlToHttp(user.avatarUrl, 80, 80, 'crop') : null);
|
||||
@@ -96,7 +95,7 @@ function ProfileEditor({ userId }) {
|
||||
const renderInfo = () => (
|
||||
<div className="profile-editor__info" style={{ marginBottom: avatarSrc ? '24px' : '0' }}>
|
||||
<div>
|
||||
<Text variant="h2" primary weight="medium">{twemojify(username) ?? fallbackUsername}</Text>
|
||||
<Text variant="h2" primary weight="medium">{twemojify(username) ?? userId}</Text>
|
||||
<IconButton
|
||||
src={PencilIC}
|
||||
size="extra-small"
|
||||
@@ -111,7 +110,7 @@ function ProfileEditor({ userId }) {
|
||||
return (
|
||||
<div className="profile-editor">
|
||||
<ImageUpload
|
||||
text={username ?? fallbackUsername}
|
||||
text={username ?? userId}
|
||||
bgColor={colorMXID(userId)}
|
||||
imageSrc={avatarSrc}
|
||||
onUpload={handleAvatarUpload}
|
||||
|
||||
Reference in New Issue
Block a user