diff --git a/src/common/features/polls/components/poll-widget.tsx b/src/common/features/polls/components/poll-widget.tsx index cb19258c5fe..fbf3b7c26db 100644 --- a/src/common/features/polls/components/poll-widget.tsx +++ b/src/common/features/polls/components/poll-widget.tsx @@ -41,8 +41,8 @@ export function PollWidget({ poll, isReadOnly, entry }: Props) { const endTimeFullDate = useMemo(() => format(poll.endTime, "dd.MM.yyyy HH:mm"), [poll.endTime]); const isFinished = useMemo(() => isBefore(poll.endTime, new Date()), [poll.endTime]); const showViewVotes = useMemo( - () => !poll.hideVotes && !resultsMode, - [poll.hideVotes, resultsMode] + () => (!poll.hideVotes && !resultsMode) || activeUser?.username === entry?.author, + [poll.hideVotes, resultsMode, activeUser?.username, entry?.author] ); const showChangeVote = useMemo( () => poll.voteChange && resultsMode && pollDetails.data?.status === "Active", @@ -178,7 +178,7 @@ export function PollWidget({ poll, isReadOnly, entry }: Props) { {_t(isVoting ? "polls.voting" : "polls.vote")} )} - {!pollDetails.data?.poll_trx_id && !isReadOnly && ( + {pollDetails.data && !pollDetails.data.poll_trx_id && !isReadOnly && (