move getInitialLetter to Avatar so we can reuse it for editor pills

This commit is contained in:
Bruno Windels 2019-05-20 14:20:36 +02:00
parent a47e722fa1
commit e58d844e5b
2 changed files with 33 additions and 1 deletions

View file

@ -176,7 +176,7 @@ module.exports = React.createClass({
} = this.props;
if (imageUrl === this.state.defaultImageUrl) {
const initialLetter = this._getInitialLetter(name);
const initialLetter = AvatarLogic.getInitialLetter(name);
const textNode = (
<EmojiText className="mx_BaseAvatar_initial" aria-hidden="true"
style={{ fontSize: (width * 0.65) + "px",