diff --git a/src/common/component/Message/Reaction.tsx b/src/common/component/Message/Reaction.tsx index cce14e7c..0e4f0de3 100644 --- a/src/common/component/Message/Reaction.tsx +++ b/src/common/component/Message/Reaction.tsx @@ -111,7 +111,7 @@ const ReactionDetails = ({ index }: { uids: number[]; - emoji?: keyof Emojis; + emoji: keyof Emojis; index: number; }) => { const usersData = useAppSelector((store) => store.users.byId); @@ -137,12 +137,13 @@ const ReactionDetails = ({ ); }; type Props = { + readOnly?: boolean; mid: number; reactions?: { [key in keyof Emojis]: number[]; }; }; -const Reaction: FC = ({ mid, reactions = null }) => { +const Reaction: FC = ({ mid, reactions = null, readOnly = false }) => { const [reactWithEmoji] = useReactMessageMutation(); const { currUid } = useAppSelector((store) => { return { @@ -160,20 +161,21 @@ const Reaction: FC = ({ mid, reactions = null }) => { const reacted = uids.findIndex((id: number) => id == currUid) > -1; return uids.length > 0 ? ( 1 ? count : ""} key={reaction} > } + content={} > - + @@ -181,16 +183,18 @@ const Reaction: FC = ({ mid, reactions = null }) => { ) : null; })} - - } - > - - - + {!readOnly && ( + + } + > + + + + )} ); };