diff --git a/src/components/Author/Card.tsx b/src/components/Author/Card.tsx index 7372749b..feb02cb4 100644 --- a/src/components/Author/Card.tsx +++ b/src/components/Author/Card.tsx @@ -31,7 +31,10 @@ 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.caption || props.author.bio || t('Our regular contributor') + const bio = createMemo(() => { + return props.caption || props.author.bio || t('Our regular contributor') + }) + const name = () => { return props.author.name === 'Дискурс' && locale() !== 'ru' ? 'Discours' diff --git a/src/pages/author/[slug]/index.astro b/src/pages/author/[slug]/index.astro index 97153431..663d893a 100644 --- a/src/pages/author/[slug]/index.astro +++ b/src/pages/author/[slug]/index.astro @@ -7,7 +7,7 @@ import { PRERENDERED_ARTICLES_COUNT } from '../../../components/Views/Author' const slug = Astro.params.slug.toString() const shouts = await apiClient.getShouts({ filters: { author: slug }, limit: PRERENDERED_ARTICLES_COUNT }) -const author = await apiClient.getAuthorsBy({ by: { slug } }) +const author = await apiClient.getAuthor({ slug }) const { pathname, search } = Astro.url initRouter(pathname, search)