From 5b96a6635fad1217cc1128cde9baf7274866aee6 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 14 Aug 2023 11:17:42 +0200 Subject: [PATCH] Forum Panel: Fix duplicated translation button (#3724) --- src/components/left/main/ForumPanel.tsx | 2 +- src/components/middle/HeaderActions.tsx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/left/main/ForumPanel.tsx b/src/components/left/main/ForumPanel.tsx index 3b89c263f..730bcea92 100644 --- a/src/components/left/main/ForumPanel.tsx +++ b/src/components/left/main/ForumPanel.tsx @@ -243,7 +243,7 @@ const ForumPanel: FC = ({ threadId={MAIN_THREAD_ID} messageListType="thread" canExpandActions={false} - withForumActions + isForForum isMobile={isMobile} onTopicSearch={onTopicSearch} /> diff --git a/src/components/middle/HeaderActions.tsx b/src/components/middle/HeaderActions.tsx index 22f88f254..240a03523 100644 --- a/src/components/middle/HeaderActions.tsx +++ b/src/components/middle/HeaderActions.tsx @@ -46,7 +46,7 @@ interface OwnProps { threadId: number; messageListType: MessageListType; canExpandActions: boolean; - withForumActions?: boolean; + isForForum?: boolean; isMobile?: boolean; onTopicSearch?: NoneToVoidFunction; } @@ -98,7 +98,7 @@ const HeaderActions: FC = ({ canCreateVoiceChat, pendingJoinRequests, isRightColumnShown, - withForumActions, + isForForum, canExpandActions, shouldJoinToSend, shouldSendJoinRequest, @@ -176,7 +176,7 @@ const HeaderActions: FC = ({ }); const handleSearchClick = useLastCallback(() => { - if (withForumActions) { + if (isForForum) { onTopicSearch?.(); return; } @@ -281,7 +281,7 @@ const HeaderActions: FC = ({ return (
- {canTranslate && ( + {!isForForum && canTranslate && ( = ({ )} )} - {!withForumActions && Boolean(pendingJoinRequests) && ( + {!isForForum && Boolean(pendingJoinRequests) && (