|
|
@ -52,6 +52,13 @@ export default class ActionBar extends React.PureComponent { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isStatusesPageActive = (match, location) => { |
|
|
|
|
|
|
|
if (!match) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return !location.pathname.match(/\/(followers|following)\/?$/); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
render () { |
|
|
|
render () { |
|
|
|
const { account, intl } = this.props; |
|
|
|
const { account, intl } = this.props; |
|
|
|
|
|
|
|
|
|
|
@ -136,7 +143,7 @@ export default class ActionBar extends React.PureComponent { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div className='account__action-bar-links'> |
|
|
|
<div className='account__action-bar-links'> |
|
|
|
<NavLink exact activeClassName='active' className='account__action-bar__tab' to={`/accounts/${account.get('id')}`}> |
|
|
|
<NavLink isActive={this.isStatusesPageActive} activeClassName='active' className='account__action-bar__tab' to={`/accounts/${account.get('id')}`}> |
|
|
|
<FormattedMessage id='account.posts' defaultMessage='Posts' /> |
|
|
|
<FormattedMessage id='account.posts' defaultMessage='Posts' /> |
|
|
|
<strong><FormattedNumber value={account.get('statuses_count')} /></strong> |
|
|
|
<strong><FormattedNumber value={account.get('statuses_count')} /></strong> |
|
|
|
</NavLink> |
|
|
|
</NavLink> |
|
|
|