Merge branch 'prepare-comments' into prepare-inbox

This commit is contained in:
tonyrewin 2022-11-23 08:33:30 +03:00
commit 75af4d5ce0
3 changed files with 17 additions and 23 deletions

View File

@ -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
})

View File

@ -12,10 +12,18 @@ 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, s.length - 1)
const nos = (s) => s.slice(0, -1)
export const StatMetrics = (props: StatMetricsProps) => {
return (

View File

@ -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
}
}
`