// @flow import 'scss/component/_emote-selector.scss'; import { EMOTES_24px as EMOTES } from 'constants/emotes'; import * as ICONS from 'constants/icons'; import Button from 'component/button'; import EMOJIS from 'emoji-dictionary'; import OptimizedImage from 'component/optimizedImage'; import React from 'react'; const OLD_QUICK_EMOJIS = [ EMOJIS.getUnicode('rocket'), EMOJIS.getUnicode('jeans'), EMOJIS.getUnicode('fire'), EMOJIS.getUnicode('heart'), EMOJIS.getUnicode('open_mouth'), ]; type Props = { commentValue: string, setCommentValue: (string) => void, closeSelector: () => void }; export default function EmoteSelector(props: Props) { const { commentValue, setCommentValue, closeSelector } = props; function addEmoteToComment(emote: string) { setCommentValue( commentValue + (commentValue && commentValue.charAt(commentValue.length - 1) !== ' ' ? ` ${emote} ` : `${emote} `) ); } return (