Merge branch 'prepare-comments' into prepare-inbox
This commit is contained in:
commit
75af4d5ce0
|
@ -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
|
||||
})
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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
|
||||
body
|
||||
createdAt
|
||||
createdBy {
|
||||
slug
|
||||
userpic
|
||||
name
|
||||
}
|
||||
body
|
||||
kind
|
||||
}
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue
Block a user