about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorChristian Schmidt <github@chsc.dk>2023-04-03 16:25:15 +0200
committerGitHub <noreply@github.com>2023-04-03 16:25:15 +0200
commit77bd32a26abbf8b49caf35dcdf170e312e48a277 (patch)
treeaa5916fa89c2d135896a28dd952c4561fe9b58b4 /app
parent23813e23b3a5227fa0d9d905ce9825c25e021576 (diff)
Add colour to follow button when hashtag is being followed (#24361)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/features/hashtag_timeline/index.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.jsx b/app/javascript/mastodon/features/hashtag_timeline/index.jsx
index 58423f429..a244dbdb2 100644
--- a/app/javascript/mastodon/features/hashtag_timeline/index.jsx
+++ b/app/javascript/mastodon/features/hashtag_timeline/index.jsx
@@ -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>
       );