[Glitch] Add colour to follow button when hashtag is being followed

Port d5da587d27 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Christian Schmidt 2023-04-03 16:25:15 +02:00 committed by Claire
parent 5fbae7cb2a
commit 90ecb96dba

View file

@ -191,8 +191,12 @@ class HashtagTimeline extends React.PureComponent {
if (tag) { if (tag) {
const following = tag.get('following'); const following = tag.get('following');
const classes = classNames('column-header__button', {
active: following,
});
followButton = ( followButton = (
<button className={classNames('column-header__button')} onClick={this.handleFollow} disabled={!signedIn} active={following} title={intl.formatMessage(following ? messages.unfollowHashtag : messages.followHashtag)} aria-label={intl.formatMessage(following ? messages.unfollowHashtag : messages.followHashtag)}> <button className={classes} onClick={this.handleFollow} disabled={!signedIn} title={intl.formatMessage(following ? messages.unfollowHashtag : messages.followHashtag)} aria-label={intl.formatMessage(following ? messages.unfollowHashtag : messages.followHashtag)}>
<Icon id={following ? 'user-times' : 'user-plus'} fixedWidth className='column-header__icon' /> <Icon id={following ? 'user-times' : 'user-plus'} fixedWidth className='column-header__icon' />
</button> </button>
); );