import React from 'react'; import { Tinode } from 'tinode-sdk'; import { idToColorClass } from '../lib/strformat.js'; import { sanitizeUrlForMime } from '../lib/utils.js'; export default class LetterTile extends React.PureComponent { render() { let avatar; if (this.props.avatar === true) { const isGroup = Tinode.isGroupTopicName(this.props.topic); const iconColor = idToColorClass(this.props.topic, isGroup); if (this.props.topic && this.props.title && this.props.title.trim()) { const letter = this.props.title.trim().charAt(0); const className = 'lettertile ' + iconColor + (this.props.deleted ? ' disabled' : ''); avatar = (