capitalizeFirstLetter,
markdownHelpUrl,
mdToHtml,
- showAvatars,
- pictshareAvatarThumbnail,
wsJsonToRes,
toast,
randomStr,
setupTribute,
setupTippy,
} from '../utils';
+import { UserListing } from './user-listing';
import Tribute from 'tributejs/src/Tribute.js';
import autosize from 'autosize';
import { i18n } from '../i18next';
{this.state.recipient && (
<div class="col-sm-10 form-control-plaintext">
- <Link
- className="text-body font-weight-bold"
- to={`/u/${this.state.recipient.name}`}
- >
- {this.state.recipient.avatar && showAvatars() && (
- <img
- height="32"
- width="32"
- src={pictshareAvatarThumbnail(
- this.state.recipient.avatar
- )}
- class="rounded-circle mr-1"
- />
- )}
- <span>{this.state.recipient.name}</span>
- </Link>
+ <UserListing
+ user={{
+ name: this.state.recipient.name,
+ avatar: this.state.recipient.avatar,
+ }}
+ />
</div>
)}
</div>
</button>
{this.state.privateMessageForm.content && (
<button
- className={`btn btn-secondary mr-2 ${this.state.previewMode &&
- 'active'}`}
+ className={`btn btn-secondary mr-2 ${
+ this.state.previewMode && 'active'
+ }`}
onClick={linkEvent(this, this.handlePreviewToggle)}
>
{i18n.t('preview')}