following-debug

This commit is contained in:
Untone 2024-05-05 20:04:47 +03:00
parent 7d17d63b5d
commit 0cbd3aedba

View File

@ -72,10 +72,9 @@ export const AuthorBadge = (props: Props) => {
})
const handleFollowClick = () => {
requireAuthentication(() => {
isSubscribed()
? unfollow(FollowingEntity.Author, props.author.slug)
: follow(FollowingEntity.Author, props.author.slug)
requireAuthentication(async () => {
const handle = isSubscribed() ? unfollow : follow
await handle(FollowingEntity.Author, props.author.slug)
}, 'subscribe')
}