From ce9c0b4aa7bf42fa25c7809d6de0a50fb1be5456 Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Fri, 30 Aug 2019 12:34:38 -0700
Subject: Better tribute.

---
 ui/src/components/comment-form.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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

diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx
index b4cc03a4..457fd359 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -6,7 +6,7 @@ import { WebSocketService, UserService } from '../services';
 import * as autosize from 'autosize';
 import { i18n } from '../i18next';
 import { T } from 'inferno-i18next';
-declare var Tribute: any;
+import Tribute from 'tributejs/src/Tribute.js';
 
 interface CommentFormProps {
   postId?: number;
@@ -50,7 +50,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
             return `[/u/${item.original.key}](/u/${item.original.key})`;
           },
           values: (text: string, cb: any) => {
-            this.userSearch(text, users => cb(users));
+            this.userSearch(text, (users: any) => cb(users));
           },
           autocompleteMode: true,
         },
@@ -62,7 +62,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
             return `[/c/${item.original.key}](/c/${item.original.key})`;
           },
           values: (text: string, cb: any) => {
-            this.communitySearch(text, communities => cb(communities));
+            this.communitySearch(text, (communities: any) => cb(communities));
           },
           autocompleteMode: true,
         }
@@ -149,7 +149,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
         type_: SearchType[SearchType.Users],
         sort: SortType[SortType.TopAll],
         page: 1,
-        limit: fetchLimit,
+        limit: 6,
       };
 
       WebSocketService.Instance.search(form);
@@ -180,7 +180,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
         type_: SearchType[SearchType.Communities],
         sort: SortType[SortType.TopAll],
         page: 1,
-        limit: fetchLimit,
+        limit: 6,
       };
 
       WebSocketService.Instance.search(form);
-- 
cgit v1.2.3

