Feature/add stat in author card (#206)

* add stat in AuthorCard
This commit is contained in:
Ilya Y 2023-09-02 21:04:12 +03:00 committed by GitHub
parent 7df56405c4
commit 50baf5b60f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -173,8 +173,8 @@ export const AuthorCard = (props: AuthorCardProps) => {
<span class={clsx({ [styles.authorName]: !props.hasLink })}>{name()}</span>
</ConditionalWrapper>
</div>
<Show when={props.author.bio}>
{/*TODO: implement plurals by i18n*/}
<Show when={props.author.bio} fallback={<div>{props.author.stat?.shouts} публикаций</div>}>
<div
class={styles.authorAbout}
classList={{ 'text-truncate': props.truncateBio }}

View File

@ -8,6 +8,9 @@ export default gql`
name
userpic
bio
stat {
shouts
}
}
}
`

View File

@ -8,6 +8,9 @@ export default gql`
name
userpic
bio
stat {
shouts
}
}
}
`