From a47af02e1b3a5d31ed2e286f508d814334dbfab1 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 29 Aug 2019 21:38:06 -0700 Subject: Fixing tribute. --- ui/src/components/comment-form.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 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 b26fe0c9..57518a13 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'; -import * as tributejs from 'tributejs'; +declare var Tribute: any; interface CommentFormProps { postId?: number; @@ -23,7 +23,7 @@ interface CommentFormState { export class CommentForm extends Component { - private id = `comment-form-${btoa(Math.random()).substring(0,12)}`; + private id = `comment-form-${Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10)}`; private userSub: Subscription; private communitySub: Subscription; private tribute: any; @@ -40,7 +40,7 @@ export class CommentForm extends Component { constructor(props: any, context: any) { super(props, context); - this.tribute = new tributejs({ + this.tribute = new Tribute({ collection: [ // Users -- cgit v1.2.3