ProfileStats: prettify code

This commit is contained in:
Alex Gleason 2021-09-13 13:14:15 -05:00
parent 5cbeaad97a
commit 0eed6405d2
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 22 additions and 13 deletions

View file

@ -29,14 +29,23 @@ class ProfileStats extends React.PureComponent {
const acct = account.get('acct');
return (
<div className='sidebar-menu-profile__stats'>
<NavLink className='sidebar-menu-profile-stat' to={`/@${acct}/followers`} onClick={this.handleClose} title={intl.formatNumber(account.get('followers_count'))}>
<strong className='sidebar-menu-profile-stat__value'>{shortNumberFormat(account.get('followers_count'))}</strong>
<span className='sidebar-menu-profile-stat__label'>{intl.formatMessage(messages.followers)}</span>
<div className='profile-stats'>
<NavLink className='profile-stat' to={`/@${acct}/followers`} onClick={this.handleClose} title={intl.formatNumber(account.get('followers_count'))}>
<strong className='profile-stat__value'>
{shortNumberFormat(account.get('followers_count'))}
</strong>
<span className='profile-stat__label'>
{intl.formatMessage(messages.followers)}
</span>
</NavLink>
<NavLink className='sidebar-menu-profile-stat' to={`/@${acct}/following`} onClick={this.handleClose} title={intl.formatNumber(account.get('following_count'))}>
<strong className='sidebar-menu-profile-stat__value'>{shortNumberFormat(account.get('following_count'))}</strong>
<span className='sidebar-menu-profile-stat__label'>{intl.formatMessage(messages.follows)}</span>
<NavLink className='profile-stat' to={`/@${acct}/following`} onClick={this.handleClose} title={intl.formatNumber(account.get('following_count'))}>
<strong className='profile-stat__value'>
{shortNumberFormat(account.get('following_count'))}
</strong>
<span className='profile-stat__label'>
{intl.formatMessage(messages.follows)}
</span>
</NavLink>
</div>
);

View file

@ -129,14 +129,14 @@
padding-left: 10px;
}
}
}
&__stats {
.profile-stats {
display: flex;
margin-top: 12px;
}
}
.sidebar-menu-profile-stat {
.profile-stat {
display: flex;
font-size: 14px;
text-decoration: none;