Remove redundant variables
This commit is contained in:
parent
a62d454915
commit
dee69e4f83
2 changed files with 3 additions and 5 deletions
|
@ -6,7 +6,7 @@ import { hideRecentEmojis } from 'mastodon/initial_state';
|
|||
|
||||
import { useEmoji } from '../../../actions/emojis';
|
||||
import { changeSetting } from '../../../actions/settings';
|
||||
import { shortCodes } from '../../emoji/emoji_mart_data_light';
|
||||
import unicodeMapping from '../../emoji/emoji_unicode_mapping_light';
|
||||
import EmojiPickerDropdown from '../components/emoji_picker_dropdown';
|
||||
|
||||
|
||||
|
@ -42,11 +42,12 @@ const getFrequentlyUsedEmojis = createSelector([
|
|||
}; },
|
||||
], data => {
|
||||
const { emojiCounters, reactionDeck } = data;
|
||||
|
||||
let deckEmojis = reactionDeck
|
||||
.toArray()
|
||||
.map((e) => e.get('name'))
|
||||
.filter((e) => e)
|
||||
.map((e) => shortCodes[e] || e);
|
||||
.map((e) => unicodeMapping[e] ? unicodeMapping[e].shortCode : e);
|
||||
deckEmojis = [...new Set(deckEmojis)];
|
||||
|
||||
let emojis;
|
||||
|
|
|
@ -7,7 +7,6 @@ import { unicodeToUnifiedName } from './unicode_to_unified_name';
|
|||
const [ shortCodesToEmojiData, skins, categories, short_names ] = emojiCompressed;
|
||||
|
||||
const emojis = {};
|
||||
const shortCodes = {};
|
||||
|
||||
// decompress
|
||||
Object.keys(shortCodesToEmojiData).forEach((shortCode) => {
|
||||
|
@ -34,12 +33,10 @@ Object.keys(shortCodesToEmojiData).forEach((shortCode) => {
|
|||
short_names,
|
||||
unified,
|
||||
};
|
||||
shortCodes[native] = shortCode;
|
||||
});
|
||||
|
||||
export {
|
||||
emojis,
|
||||
shortCodes,
|
||||
skins,
|
||||
categories,
|
||||
short_names,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue