mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-03 14:09:02 +01: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;
|