diff --git a/public/locales/ru/translation.json b/public/locales/ru/translation.json index bcdc7e2c..716bf306 100644 --- a/public/locales/ru/translation.json +++ b/public/locales/ru/translation.json @@ -529,6 +529,7 @@ "repeat": "повторить", "resend confirmation link": "отправить ссылку ещё раз", "shout": "пост", + "shout not found": "публикация не найдена", "shoutsWithCount": "{count} {count, plural, one {пост} few {поста} other {постов}}", "sign in": "войти", "sign up or sign in": "зарегистрироваться или войти", diff --git a/src/components/Feed/ArticleCard/ArticleCard.tsx b/src/components/Feed/ArticleCard/ArticleCard.tsx index 58f69cdf..92ecb5f1 100644 --- a/src/components/Feed/ArticleCard/ArticleCard.tsx +++ b/src/components/Feed/ArticleCard/ArticleCard.tsx @@ -23,7 +23,7 @@ import stylesHeader from '../../Nav/Header/Header.module.scss' import styles from './ArticleCard.module.scss' export type ArticleCardProps = { - // TODO: refactor this, please +// TODO: refactor this, please settings?: { noicon?: boolean noimage?: boolean @@ -67,7 +67,7 @@ const getTitleAndSubtitle = ( subtitle: string } => { let title = article.title - let subtitle = article.subtitle + let subtitle: string = article.subtitle || '' if (!subtitle) { let tt = article.title?.split('. ') || [] @@ -79,7 +79,7 @@ const getTitleAndSubtitle = ( if (tt && tt.length > 1) { const sep = article.title?.replace(tt[0], '').split(' ', 1)[0] title = tt[0] + (sep === '.' || sep === ':' ? '' : sep) - subtitle = capitalize(article.title?.replace(tt[0] + sep, ''), true) + subtitle = capitalize(article.title?.replace(tt[0] + sep, ''), true) || '' } } @@ -131,6 +131,7 @@ export const ArticleCard = (props: ArticleCardProps) => { scrollTo: 'comments', }) } + return (
{ [aspectRatio()]: props.withAspectRatio, })} > + {/* Cover Image */} + {/* Cover Image Container */}
{
+ + {/* Shout Card Content */}
+ {/* Shout Card Icon */} { + {/* Main Topic */} { /> + {/* Title and Subtitle */}
{
+ + {/* Details */} + {/* Author and Date */}
- {(a: Author) => { - return ( - - ) - }} + {(a: Author) => ( + + )}
@@ -244,6 +253,8 @@ export const ArticleCard = (props: ArticleCardProps) => {
+ + {/* Description */}