From d16df598fa93074d6210d4699937ce42c8b51b22 Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Wed, 4 Sep 2019 15:22:31 -0700
Subject: Adding emoji-short-name package.

- Fixes #266
---
 ui/src/components/comment-form.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 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 54035fde..e18a6e3f 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -2,12 +2,12 @@ import { Component, linkEvent } from 'inferno';
 import { CommentNode as CommentNodeI, CommentForm as CommentFormI, SearchForm, SearchType, SortType, UserOperation, SearchResponse } from '../interfaces';
 import { Subscription } from "rxjs";
 import { capitalizeFirstLetter, mentionDropdownFetchLimit, msgOp, mdToHtml, randomStr, imageUploadUrl, markdownHelpUrl } from '../utils';
-import { twemojis } from '../twemojis';
 import { WebSocketService, UserService } from '../services';
 import * as autosize from 'autosize';
 import { i18n } from '../i18next';
 import { T } from 'inferno-i18next';
 import Tribute from 'tributejs/src/Tribute.js';
+import * as emojiShortName from 'emoji-short-name';
 
 interface CommentFormProps {
   postId?: number;
@@ -55,7 +55,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
           selectTemplate: (item: any) => {
             return `:${item.original.key}:`;
           },
-          values: Object.entries(twemojis).map(e => {return {'key': e[0], 'val': e[1]}}),
+          values: Object.entries(emojiShortName).map(e => {return {'key': e[1], 'val': e[0]}}),
           allowSpaces: false,
           autocompleteMode: true,
           menuItemLimit: 10,
-- 
cgit v1.2.3

