hide author bio in ArticleCard (#249)

This commit is contained in:
Ilya Y 2023-10-05 09:20:23 +03:00 committed by GitHub
parent 9e5b468914
commit b6252838a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,7 @@ type Props = {
followers?: Author[]
following?: Array<Author | Topic>
showPublicationsCounter?: boolean
hideBio?: boolean
}
export const AuthorCard = (props: Props) => {
@ -194,7 +195,7 @@ export const AuthorCard = (props: Props) => {
</div>
{/*TODO: implement plurals by i18n*/}
<Show
when={props.author.bio}
when={props.author.bio && !props.hideBio}
fallback={
props.showPublicationsCounter ? (
<div class={styles.authorAbout}>{props.author.stat?.shouts} публикаций</div>

View File

@ -179,6 +179,7 @@ export const ArticleCard = (props: ArticleCardProps) => {
<AuthorCard
author={author}
hideWriteButton={true}
hideBio={true}
hideFollow={true}
truncateBio={true}
isFeedMode={true}