From e78609b5c0589b7e79543e71c4cdb6c900f38232 Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Fri, 15 Dec 2017 15:31:49 -0500 Subject: [PATCH] :lipstick: --- src/components/emoji.js | 4 +++- src/components/picker.js | 11 +++++++++-- src/utils/emoji-index.js | 8 ++------ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/components/emoji.js b/src/components/emoji.js index 95cba54..efe091d 100644 --- a/src/components/emoji.js +++ b/src/components/emoji.js @@ -61,7 +61,9 @@ const Emoji = props => { } let data = _getData(props) - if (!data) { return null } + if (!data) { + return null + } let { unified, custom, short_names, imageUrl } = data, style = {}, diff --git a/src/components/picker.js b/src/components/picker.js index fe9be69..2d1de18 100644 --- a/src/components/picker.js +++ b/src/components/picker.js @@ -11,7 +11,12 @@ import { deepMerge, measureScrollbar } from '../utils' import { Anchors, Category, Emoji, Preview, Search } from '.' const RECENT_CATEGORY = { id: 'recent', name: 'Recent', emojis: null } -const SEARCH_CATEGORY = { id: 'search', name: 'Search', emojis: null, anchor: false } +const SEARCH_CATEGORY = { + id: 'search', + name: 'Search', + emojis: null, + anchor: false, +} const CUSTOM_CATEGORY = { id: 'custom', name: 'Custom', emojis: [] } const I18N = { @@ -465,7 +470,9 @@ export default class Picker extends React.PureComponent { i18n={this.i18n} recent={category.id == RECENT_CATEGORY.id ? recent : undefined} custom={ - category.id == RECENT_CATEGORY.id ? CUSTOM_CATEGORY.emojis : undefined + category.id == RECENT_CATEGORY.id + ? CUSTOM_CATEGORY.emojis + : undefined } emojiProps={{ native: native, diff --git a/src/utils/emoji-index.js b/src/utils/emoji-index.js index b2c3446..bf02d2f 100644 --- a/src/utils/emoji-index.js +++ b/src/utils/emoji-index.js @@ -66,13 +66,9 @@ function search( data.categories.forEach(category => { let isIncluded = - include && include.length - ? include.indexOf(category.id) > -1 - : true + include && include.length ? include.indexOf(category.id) > -1 : true let isExcluded = - exclude && exclude.length - ? exclude.indexOf(category.id) > -1 - : false + exclude && exclude.length ? exclude.indexOf(category.id) > -1 : false if (!isIncluded || isExcluded) { return }