From dda1aa55fae28676c1d7e47df3aacfd4c1415dd4 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Tue, 22 Nov 2022 17:05:41 +0300 Subject: [PATCH 1/4] trig-test-build --- src/components/_shared/StatMetrics.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/_shared/StatMetrics.tsx b/src/components/_shared/StatMetrics.tsx index fd60946c..17d5055a 100644 --- a/src/components/_shared/StatMetrics.tsx +++ b/src/components/_shared/StatMetrics.tsx @@ -15,7 +15,7 @@ const pseudonames = { comments: 'discussions' } -const nos = (s) => s.slice(0, s.length - 1) +const nos = (s) => s.slice(0, -1) export const StatMetrics = (props: StatMetricsProps) => { return ( From 76460a1289bc722fc25384ab6f60499bb2139628 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Tue, 22 Nov 2022 21:20:26 +0300 Subject: [PATCH 2/4] working load --- src/graphql/query/reactions-load-by.ts | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/graphql/query/reactions-load-by.ts b/src/graphql/query/reactions-load-by.ts index 914dc98d..442496aa 100644 --- a/src/graphql/query/reactions-load-by.ts +++ b/src/graphql/query/reactions-load-by.ts @@ -1,32 +1,18 @@ import { gql } from '@urql/core' export default gql` - query LoadReactionsByQuery($by: ReactionBy!, $limit: Int!, $offset: Int!) { + query LoadReactions($by: ReactionBy!, $limit: Int, $offset: Int) { loadReactionsBy(by: $by, limit: $limit, offset: $offset) { id - createdBy { - slug - name - userpic - } - body - kind - createdAt - updatedAt shout { - slug title } - replyTo { - id - createdBy { - slug - userpic - name - } - body - kind + body + createdAt + createdBy { + name } + updatedAt } } ` From 817d2e2d7448d52c16e5bb900432b304b34a9b80 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Tue, 22 Nov 2022 22:04:55 +0300 Subject: [PATCH 3/4] fix-condition --- src/components/Views/Article.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Views/Article.tsx b/src/components/Views/Article.tsx index 84c24f41..d8679c69 100644 --- a/src/components/Views/Article.tsx +++ b/src/components/Views/Article.tsx @@ -22,7 +22,7 @@ export const ArticleView = (props: ArticlePageProps) => { try { setIsCommentsLoading(true) await loadReactionsBy({ - by: { shout: props.article.slug }, + by: { shout: props.article.slug, comment: true }, limit: ARTICLE_COMMENTS_PAGE_SIZE, offset: getCommentsPage() * ARTICLE_COMMENTS_PAGE_SIZE }) From 3d2224e7f2226ae30deeb5376bcdfe5c4642ff94 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Wed, 23 Nov 2022 08:28:41 +0300 Subject: [PATCH 4/4] pseudonames --- src/components/_shared/StatMetrics.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/_shared/StatMetrics.tsx b/src/components/_shared/StatMetrics.tsx index 17d5055a..aedec322 100644 --- a/src/components/_shared/StatMetrics.tsx +++ b/src/components/_shared/StatMetrics.tsx @@ -12,7 +12,15 @@ interface StatMetricsProps { } const pseudonames = { - comments: 'discussions' + // topics: 'topics' # amount of topics for community💥 + followed: 'followers', + followers: 'followers', + reacted: 'involvings', + reactions: 'involvings', + commented: 'discoussions', + comments: 'discussions', + shouts: 'posts', + authors: 'authors' } const nos = (s) => s.slice(0, -1)