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

View File

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