forked from mirrors/catstodon
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.
12 lines
327 B
JavaScript
12 lines
327 B
JavaScript
2 years ago
|
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;
|