author name hotfix
This commit is contained in:
parent
4191439d4d
commit
04d9f47aec
|
@ -55,9 +55,18 @@ export const AuthorCard = (props: AuthorCardProps) => {
|
||||||
|
|
||||||
const canFollow = createMemo(() => !props.hideFollow && session()?.user?.slug !== props.author.slug)
|
const canFollow = createMemo(() => !props.hideFollow && session()?.user?.slug !== props.author.slug)
|
||||||
|
|
||||||
const name = () => {
|
const name = createMemo(() => {
|
||||||
return props.author.name === 'Дискурс' && locale() !== 'ru' ? 'Discours' : translit(props.author.name)
|
if (locale() !== 'ru') {
|
||||||
|
if (props.author.name === 'Дискурс') {
|
||||||
|
return 'Discours'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return translit(props.author.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
return props.author.name
|
||||||
|
})
|
||||||
|
|
||||||
// TODO: reimplement AuthorCard
|
// TODO: reimplement AuthorCard
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -134,8 +134,11 @@ export const ArticleCard = (props: ArticleCardProps) => {
|
||||||
<div class={styles.shoutAuthor}>
|
<div class={styles.shoutAuthor}>
|
||||||
<For each={authors}>
|
<For each={authors}>
|
||||||
{(author, index) => {
|
{(author, index) => {
|
||||||
const name =
|
let name = author.name
|
||||||
author.name === 'Дискурс' && locale() !== 'ru' ? 'Discours' : translit(author.name)
|
|
||||||
|
if (locale() !== 'ru') {
|
||||||
|
name = name === 'Дискурс' ? 'Discours' : translit(name)
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user