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