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 = () => { const handleFollowClick = () => {
requireAuthentication(() => { requireAuthentication(async () => {
isSubscribed() const handle = isSubscribed() ? unfollow : follow
? unfollow(FollowingEntity.Author, props.author.slug) await handle(FollowingEntity.Author, props.author.slug)
: follow(FollowingEntity.Author, props.author.slug)
}, 'subscribe') }, 'subscribe')
} }