Skip to content

Commit

Permalink
refs #1529 Disable tag follow button if you're not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
h3poteto committed Jul 27, 2024
1 parent 432aec8 commit 1195a87
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/components/detail/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,22 @@ export default function TagDetail(props: Props) {
</FlexboxGrid.Item>
<FlexboxGrid.Item>
{hashtag && hashtag.following && (
<Button appearance="link" onClick={unfollowHashtag} title={formatMessage({ id: 'detail.unfollow_tag' })}>
<Button
appearance="link"
onClick={unfollowHashtag}
title={formatMessage({ id: 'detail.unfollow_tag' })}
disabled={account === null}
>
<Icon as={BsPersonX} style={{ fontSize: '1.2em' }} />
</Button>
)}
{hashtag && !hashtag.following && (
<Button appearance="link" onClick={followHashtag} title={formatMessage({ id: 'detail.follow_tag' })}>
<Button
appearance="link"
onClick={followHashtag}
title={formatMessage({ id: 'detail.follow_tag' })}
disabled={account === null}
>
<Icon as={BsPersonPlus} style={{ fontSize: '1.2em' }} />
</Button>
)}
Expand Down

0 comments on commit 1195a87

Please sign in to comment.