From 4e1b6ad8b3b1b603f74a390689deedaddfabe7fd Mon Sep 17 00:00:00 2001 From: kvakazyambra Date: Mon, 6 Nov 2023 22:50:55 +0300 Subject: [PATCH] Fixed "Unexpected negated condition" error --- .../Author/AuthorCard/AuthorCard.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/Author/AuthorCard/AuthorCard.tsx b/src/components/Author/AuthorCard/AuthorCard.tsx index f8dcc344..662aa1a9 100644 --- a/src/components/Author/AuthorCard/AuthorCard.tsx +++ b/src/components/Author/AuthorCard/AuthorCard.tsx @@ -99,16 +99,16 @@ export const AuthorCard = (props: Props) => { const followButtonText = () => { if (isSubscribing()) { return t('subscribing...') + } else if (subscribed()) { + return ( + <> + {t('Following')} + {t('Unfollow')} + + ) + } else { + return t('Follow') } - - return !subscribed() ? ( - t('Follow') - ) : ( - <> - {t('Following')} - {t('Unfollow')} - - ) } return (