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