Forum Panel: Fix duplicated translation button (#3724)
This commit is contained in:
parent
fc605350ea
commit
5b96a6635f
@ -243,7 +243,7 @@ const ForumPanel: FC<OwnProps & StateProps> = ({
|
|||||||
threadId={MAIN_THREAD_ID}
|
threadId={MAIN_THREAD_ID}
|
||||||
messageListType="thread"
|
messageListType="thread"
|
||||||
canExpandActions={false}
|
canExpandActions={false}
|
||||||
withForumActions
|
isForForum
|
||||||
isMobile={isMobile}
|
isMobile={isMobile}
|
||||||
onTopicSearch={onTopicSearch}
|
onTopicSearch={onTopicSearch}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -46,7 +46,7 @@ interface OwnProps {
|
|||||||
threadId: number;
|
threadId: number;
|
||||||
messageListType: MessageListType;
|
messageListType: MessageListType;
|
||||||
canExpandActions: boolean;
|
canExpandActions: boolean;
|
||||||
withForumActions?: boolean;
|
isForForum?: boolean;
|
||||||
isMobile?: boolean;
|
isMobile?: boolean;
|
||||||
onTopicSearch?: NoneToVoidFunction;
|
onTopicSearch?: NoneToVoidFunction;
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ const HeaderActions: FC<OwnProps & StateProps> = ({
|
|||||||
canCreateVoiceChat,
|
canCreateVoiceChat,
|
||||||
pendingJoinRequests,
|
pendingJoinRequests,
|
||||||
isRightColumnShown,
|
isRightColumnShown,
|
||||||
withForumActions,
|
isForForum,
|
||||||
canExpandActions,
|
canExpandActions,
|
||||||
shouldJoinToSend,
|
shouldJoinToSend,
|
||||||
shouldSendJoinRequest,
|
shouldSendJoinRequest,
|
||||||
@ -176,7 +176,7 @@ const HeaderActions: FC<OwnProps & StateProps> = ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handleSearchClick = useLastCallback(() => {
|
const handleSearchClick = useLastCallback(() => {
|
||||||
if (withForumActions) {
|
if (isForForum) {
|
||||||
onTopicSearch?.();
|
onTopicSearch?.();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ const HeaderActions: FC<OwnProps & StateProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="HeaderActions">
|
<div className="HeaderActions">
|
||||||
{canTranslate && (
|
{!isForForum && canTranslate && (
|
||||||
<DropdownMenu
|
<DropdownMenu
|
||||||
className="stickers-more-menu with-menu-transitions"
|
className="stickers-more-menu with-menu-transitions"
|
||||||
trigger={MoreMenuButton}
|
trigger={MoreMenuButton}
|
||||||
@ -367,7 +367,7 @@ const HeaderActions: FC<OwnProps & StateProps> = ({
|
|||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{!withForumActions && Boolean(pendingJoinRequests) && (
|
{!isForForum && Boolean(pendingJoinRequests) && (
|
||||||
<Button
|
<Button
|
||||||
round
|
round
|
||||||
className="badge-button"
|
className="badge-button"
|
||||||
@ -414,7 +414,7 @@ const HeaderActions: FC<OwnProps & StateProps> = ({
|
|||||||
canCreateVoiceChat={canCreateVoiceChat}
|
canCreateVoiceChat={canCreateVoiceChat}
|
||||||
pendingJoinRequests={pendingJoinRequests}
|
pendingJoinRequests={pendingJoinRequests}
|
||||||
onJoinRequestsClick={handleJoinRequestsClick}
|
onJoinRequestsClick={handleJoinRequestsClick}
|
||||||
withForumActions={withForumActions}
|
withForumActions={isForForum}
|
||||||
onSubscribeChannel={handleSubscribeClick}
|
onSubscribeChannel={handleSubscribeClick}
|
||||||
onSearchClick={handleSearchClick}
|
onSearchClick={handleSearchClick}
|
||||||
onAsMessagesClick={handleAsMessagesClick}
|
onAsMessagesClick={handleAsMessagesClick}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user