diff --git a/packages/pl-fe/src/components/status-reactions-bar.tsx b/packages/pl-fe/src/components/status-reactions-bar.tsx index c897d61544..838068fe27 100644 --- a/packages/pl-fe/src/components/status-reactions-bar.tsx +++ b/packages/pl-fe/src/components/status-reactions-bar.tsx @@ -6,7 +6,7 @@ import { defineMessages, useIntl } from 'react-intl'; import { emojiReact, unEmojiReact } from 'pl-fe/actions/emoji-reacts'; import EmojiPickerDropdown from 'pl-fe/features/emoji/containers/emoji-picker-dropdown-container'; import unicodeMapping from 'pl-fe/features/emoji/mapping'; -import { useAppDispatch, useSettings } from 'pl-fe/hooks'; +import { useAppDispatch, useLoggedIn, useSettings } from 'pl-fe/hooks'; import AnimatedNumber from './animated-number'; import { Emoji, HStack, Icon, Text } from './ui'; @@ -28,9 +28,10 @@ interface IStatusReaction { status: Pick; reaction: EmojiReaction; obfuscate?: boolean; + disabled?: boolean; } -const StatusReaction: React.FC = ({ reaction, status, obfuscate }) => { +const StatusReaction: React.FC = ({ reaction, status, obfuscate, disabled }) => { const dispatch = useAppDispatch(); const intl = useIntl(); @@ -39,6 +40,8 @@ const StatusReaction: React.FC = ({ reaction, status, obfuscate const handleClick: React.MouseEventHandler = (e) => { e.stopPropagation(); + if (disabled) return; + if (reaction.me) { dispatch(unEmojiReact(status, reaction.name)); } else { @@ -57,8 +60,11 @@ const StatusReaction: React.FC = ({ reaction, status, obfuscate return ( - + {me && ( + + + + )} ); };