[Refactoring] Middle Header: Small refactoring

This commit is contained in:
Alexander Zinchuk 2021-11-29 18:25:46 +01:00
parent 2f057b6c27
commit 3aa0d100b3

View File

@ -126,7 +126,9 @@ const HeaderActions: FC<OwnProps & StateProps & DispatchProps> = ({
return (
<div className="HeaderActions">
{!IS_SINGLE_COLUMN_LAYOUT && canExpandActions && canSubscribe && (
{!IS_SINGLE_COLUMN_LAYOUT && (
<>
{canExpandActions && canSubscribe && (
<Button
size="tiny"
ripple
@ -136,7 +138,7 @@ const HeaderActions: FC<OwnProps & StateProps & DispatchProps> = ({
{lang(isChannel ? 'ProfileJoinChannel' : 'ProfileJoinGroup')}
</Button>
)}
{!IS_SINGLE_COLUMN_LAYOUT && canExpandActions && canStartBot && (
{canExpandActions && canStartBot && (
<Button
size="tiny"
ripple
@ -146,7 +148,7 @@ const HeaderActions: FC<OwnProps & StateProps & DispatchProps> = ({
{lang('BotStart')}
</Button>
)}
{!IS_SINGLE_COLUMN_LAYOUT && canExpandActions && canRestartBot && (
{canExpandActions && canRestartBot && (
<Button
size="tiny"
ripple
@ -156,7 +158,7 @@ const HeaderActions: FC<OwnProps & StateProps & DispatchProps> = ({
{lang('BotRestart')}
</Button>
)}
{!IS_SINGLE_COLUMN_LAYOUT && canSearch && (
{canSearch && (
<Button
round
ripple={isRightColumnShown}
@ -168,6 +170,8 @@ const HeaderActions: FC<OwnProps & StateProps & DispatchProps> = ({
<i className="icon-search" />
</Button>
)}
</>
)}
<Button
ref={menuButtonRef}
className={isMenuOpen ? 'active' : ''}