You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nyastodon/app/javascript/flavours/glitch/utils/emoji_map.js

12 lines
327 B
JavaScript

import { createSelector } from 'reselect';
import { Map as ImmutableMap } from 'immutable';
const buildCustomEmojiMap = createSelector(
[state => state.get('custom_emojis')],
items => items.reduce(
(map, emoji) => map.set(emoji.get('shortcode'), emoji),
ImmutableMap(),
),
);
export default buildCustomEmojiMap;