Skip to content

Commit

Permalink
Add colour to follow button when hashtag is being followed (mastodon#…
Browse files Browse the repository at this point in the history
  • Loading branch information
c960657 authored and skerit committed Jul 7, 2023
1 parent 8af356d commit 7aae201
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/javascript/mastodon/features/hashtag_timeline/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,12 @@ class HashtagTimeline extends React.PureComponent {
if (tag) {
const following = tag.get('following');

const classes = classNames('column-header__button', {
active: following,
});

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' />
</button>
);
Expand Down

0 comments on commit 7aae201

Please sign in to comment.