Fixed "Unexpected negated condition" error

This commit is contained in:
kvakazyambra 2023-11-06 22:50:55 +03:00
parent 154807d4be
commit 4e1b6ad8b3

View File

@ -99,16 +99,16 @@ export const AuthorCard = (props: Props) => {
const followButtonText = () => { const followButtonText = () => {
if (isSubscribing()) { if (isSubscribing()) {
return t('subscribing...') return t('subscribing...')
} else if (subscribed()) {
return (
<>
<span class={styles.buttonSubscribeLabel}>{t('Following')}</span>
<span class={styles.buttonSubscribeLabelHovered}>{t('Unfollow')}</span>
</>
)
} else {
return t('Follow')
} }
return !subscribed() ? (
t('Follow')
) : (
<>
<span class={styles.buttonSubscribeLabel}>{t('Following')}</span>
<span class={styles.buttonSubscribeLabelHovered}>{t('Unfollow')}</span>
</>
)
} }
return ( return (