diff --git a/src/components/Views/Article.tsx b/src/components/Views/Article.tsx index 5586efad..6dab58d6 100644 --- a/src/components/Views/Article.tsx +++ b/src/components/Views/Article.tsx @@ -12,7 +12,7 @@ interface ArticlePageProps { const ARTICLE_COMMENTS_PAGE_SIZE = 50 export const ArticleView = (props: ArticlePageProps) => { - const [getCommentsPage] = createSignal(1) + const [getCommentsPage] = createSignal(0) const [getIsCommentsLoading, setIsCommentsLoading] = createSignal(false) const { reactionsByShout, loadReactionsBy } = useReactionsStore({ reactions: props.reactions }) diff --git a/src/components/_shared/StatMetrics.tsx b/src/components/_shared/StatMetrics.tsx index 3fd846ce..82cbc0c4 100644 --- a/src/components/_shared/StatMetrics.tsx +++ b/src/components/_shared/StatMetrics.tsx @@ -33,7 +33,7 @@ export const StatMetrics = (props: StatMetricsProps) => { {props.stat[entity] + ' ' + - t(nos(pseudonames[entity] || entity)) + + t((pseudonames[entity] || entity).slice(-1)) + plural(props.stat[entity] || 0, locale() === 'ru' ? ['ов', '', 'а'] : ['s', '', 's'])} )} diff --git a/src/graphql/query/reactions-load-by.ts b/src/graphql/query/reactions-load-by.ts index 442496aa..b9da7a56 100644 --- a/src/graphql/query/reactions-load-by.ts +++ b/src/graphql/query/reactions-load-by.ts @@ -4,14 +4,18 @@ export default gql` query LoadReactions($by: ReactionBy!, $limit: Int, $offset: Int) { loadReactionsBy(by: $by, limit: $limit, offset: $offset) { id - shout { - title - } body - createdAt + range + replyTo { + id + # kind + } createdBy { name + slug + userpic } + createdAt updatedAt } } diff --git a/src/utils/sortby.ts b/src/utils/sortby.ts index 4b03fdaee..fd6cb9c7 100644 --- a/src/utils/sortby.ts +++ b/src/utils/sortby.ts @@ -27,7 +27,7 @@ export const byLength = ( return 0 } -export const byStat = (metric: keyof Stat) => { +export const byStat = (metric: keyof Stat | keyof TopicStat) => { return (a, b) => { const x = (a?.stat && a.stat[metric]) || 0 const y = (b?.stat && b.stat[metric]) || 0