refactoring fixes
This commit is contained in:
parent
995a7be94e
commit
c1cc1a3ad9
|
@ -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'
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user