From 2fe1a67e23960f541e7a9cb16c2a99a72bb594af Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Sat, 19 Nov 2022 08:00:54 +0300 Subject: [PATCH] author-fixes --- src/components/Author/Card.tsx | 3 ++- src/graphql/query/authors-all.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Author/Card.tsx b/src/components/Author/Card.tsx index 7cd3131a..7372749b 100644 --- a/src/components/Author/Card.tsx +++ b/src/components/Author/Card.tsx @@ -11,6 +11,7 @@ import { clsx } from 'clsx' import { useSession } from '../../context/session' interface AuthorCardProps { + caption?: string compact?: boolean hideDescription?: boolean hideFollow?: boolean @@ -30,7 +31,7 @@ export const AuthorCard = (props: AuthorCardProps) => { () => session()?.news?.authors?.some((u) => u === props.author.slug) || false ) const canFollow = createMemo(() => !props.hideFollow && session()?.user?.slug !== props.author.slug) - const bio = () => props.author.bio || t('Our regular contributor') + const bio = () => props.caption || props.author.bio || t('Our regular contributor') const name = () => { return props.author.name === 'Дискурс' && locale() !== 'ru' ? 'Discours' diff --git a/src/graphql/query/authors-all.ts b/src/graphql/query/authors-all.ts index 4b02a3a5..dd9ff818 100644 --- a/src/graphql/query/authors-all.ts +++ b/src/graphql/query/authors-all.ts @@ -11,8 +11,8 @@ export default gql` links lastSeen stat { + shouts followers - followings } } }