summaryrefslogtreecommitdiffstats
path: root/ui/src
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-08-30 12:34:38 -0700
committerDessalines <tyhou13@gmx.com>2019-08-30 12:34:38 -0700
commitce9c0b4aa7bf42fa25c7809d6de0a50fb1be5456 (patch)
tree8822569396dac91933683f17619512cdb840c400 /ui/src
parent6c84c3b9715921dfc433b29a9923a6ff39de5e4b (diff)
Better tribute.
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/components/comment-form.tsx10
-rw-r--r--ui/src/index.html1
2 files changed, 5 insertions, 6 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);
diff --git a/ui/src/index.html b/ui/src/index.html
index f2e513f1..4dbde8b0 100644
--- a/ui/src/index.html
+++ b/ui/src/index.html
@@ -9,7 +9,6 @@
<link rel="shortcut icon" type="image/svg+xml" href="/static/assets/favicon.svg" />
<link rel="apple-touch-icon" href="/static/assets/apple-touch-icon.png" />
<script async src="/static/assets/libs/sortable/sortable.min.js"></script>
- <script async src="/static/assets/libs/tribute.min.js"></script>
<script src="/static/assets/libs/markdown-it-emoji/markdown-it-emoji.min.js" type="text/javascript"></script>
</head>