From 4119c2d30cae517481bec2674062322a597ad38d Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 28 Dec 2023 04:22:04 +0300 Subject: [PATCH] badge-fix --- .../Author/AuthorBadge/AuthorBadge.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/Author/AuthorBadge/AuthorBadge.tsx b/src/components/Author/AuthorBadge/AuthorBadge.tsx index 8f6a928c..c7bb9325 100644 --- a/src/components/Author/AuthorBadge/AuthorBadge.tsx +++ b/src/components/Author/AuthorBadge/AuthorBadge.tsx @@ -63,13 +63,17 @@ export const AuthorBadge = (props: Props) => { }, 'discussions') } - const name = createMemo(() => - capitalize( - lang() === 'en' && isCyrillic(props.author.name) - ? translit(props.author.name) - : props.author.name || '', - ), - ) + const name = createMemo(() => { + if (lang() !== 'ru' && isCyrillic(props.author.name)) { + if (props.author.name === 'Дискурс') { + return 'Discours' + } + + return translit(props.author.name) + } + + return props.author.name + }) return (