From bb287cbd076940bd09f6afb61b642370d020f91e Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Fri, 10 Apr 2020 16:55:57 -0400
Subject: Adding an admin settings page.

- Fixes #620
- Adding a UserListing component. Fixes #627
---
 ui/src/components/private-message-form.tsx | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

(limited to 'ui/src/components/private-message-form.tsx')

diff --git a/ui/src/components/private-message-form.tsx b/ui/src/components/private-message-form.tsx
index 7e498bae..6b607654 100644
--- a/ui/src/components/private-message-form.tsx
+++ b/ui/src/components/private-message-form.tsx
@@ -21,14 +21,13 @@ import {
   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';
@@ -132,22 +131,12 @@ export class PrivateMessageForm extends Component<
 
               {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>
-- 
cgit v1.2.3

