Make subscribe buttons identical

This commit is contained in:
kvakazyambra 2023-11-06 22:45:10 +03:00
parent 2a29e69d21
commit 154807d4be
2 changed files with 21 additions and 1 deletions

View File

@ -103,6 +103,14 @@
.icon img {
filter: invert(0);
}
.buttonSubscribeLabel {
display: none;
}
.buttonSubscribeLabelHovered {
display: block;
}
}
img {
@ -110,6 +118,10 @@
}
}
.buttonSubscribeLabelHovered {
display: none;
}
.buttonWriteMessage {
border-radius: 0.8rem;
padding-bottom: 0.6rem;

View File

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