From f81d0fccef125699fd47271f83b5f27a089ec03d Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Thu, 12 Dec 2024 11:13:44 -0300 Subject: [PATCH] fix: show correct emoji selected --- src/components/status-action-bar.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/status-action-bar.tsx b/src/components/status-action-bar.tsx index e35a93560..c269b3a36 100644 --- a/src/components/status-action-bar.tsx +++ b/src/components/status-action-bar.tsx @@ -661,9 +661,12 @@ const StatusActionBar: React.FC = ({ 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 = {