mirror of
https://github.com/funamitech/mastodon
synced 2024-12-17 08:09:25 +09:00
12 lines
327 B
JavaScript
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;
|