Merge branch 'fix-wrong-emoji-display' into 'main'

fix: show correct emoji selected

See merge request soapbox-pub/soapbox!3296
This commit is contained in:
Alex Gleason 2024-12-12 15:53:38 +00:00
commit 4031de3f52
1 changed files with 6 additions and 3 deletions

View File

@ -661,9 +661,12 @@ const StatusActionBar: React.FC<IStatusActionBar> = ({
const emojiReactCount = status.reactions?.reduce((acc, reaction) => acc + (reaction.count ?? 0), 0) ?? 0; // allow all emojis
const meEmojiReact = status.reactions?.find((emojiReact) => emojiReact.me) // allow all emojis
?? (account && status.favourited)
? { count: 1, me: status.account.id === account!.id, name: '👍' }
: undefined;
?? (
status.favourited && account
? { count: 1, me: status.account.id === account.id, name: '👍' }
: undefined
);
const meEmojiName = meEmojiReact?.name as keyof typeof reactMessages | undefined;
const reactMessages = {