Improve reaction_deck api

This commit is contained in:
KMY 2023-05-26 18:01:09 +09:00
parent 7e4d9a2d0d
commit 1cf9bb24d7
3 changed files with 16 additions and 22 deletions

View file

@ -13,7 +13,7 @@ import emojify from 'mastodon/features/emoji/emoji';
import { autoPlayGif } from 'mastodon/initial_state';
const MapStateToProps = (state, { emojiId, emojiMap }) => ({
emoji: (state.get('reaction_deck', ImmutableList()).toArray().find(em => em.get('id') === emojiId) || ImmutableMap({ emoji: { shortcode: '' } })).getIn(['emoji', 'shortcode']),
emoji: (state.get('reaction_deck', ImmutableList()).toArray().find(em => em.get('id') === emojiId) || ImmutableMap({ emoji: { shortcode: '' } })).get('name'),
emojiMap,
});