1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-16 23:59:11 +09:00
YuruToot/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;