diff options
author | Dessalines <tyhou13@gmx.com> | 2019-08-30 12:34:38 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-08-30 12:34:38 -0700 |
commit | ce9c0b4aa7bf42fa25c7809d6de0a50fb1be5456 (patch) | |
tree | 8822569396dac91933683f17619512cdb840c400 /ui/src/components/comment-form.tsx | |
parent | 6c84c3b9715921dfc433b29a9923a6ff39de5e4b (diff) |
Better tribute.
Diffstat (limited to 'ui/src/components/comment-form.tsx')
-rw-r--r-- | ui/src/components/comment-form.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
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); |