mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2025-01-09 10:57:00 +01:00
11 lines
327 B
JavaScript
11 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;
|