feat: Trending users @ghobs91

This commit is contained in:
2023-04-18 11:40:56 +01:00
parent 4afdd5afd4
commit d309bfd472
3 changed files with 57 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import { HexKey } from "@snort/nostr";
import useEventPublisher from "Feed/EventPublisher";
import { parseId } from "Util";
import useLogin from "Hooks/useLogin";
import AsyncButton from "Element/AsyncButton";
import messages from "./messages";
@ -37,11 +38,10 @@ export default function FollowButton(props: FollowButtonProps) {
}
return (
<button
type="button"
<AsyncButton
className={isFollowing ? `${baseClassname} secondary` : baseClassname}
onClick={() => (isFollowing ? unfollow(pubkey) : follow(pubkey))}>
{isFollowing ? <FormattedMessage {...messages.Unfollow} /> : <FormattedMessage {...messages.Follow} />}
</button>
</AsyncButton>
);
}