Merge branch 'prepare-comments' into prepare-inbox
This commit is contained in:
commit
75af4d5ce0
|
@ -22,7 +22,7 @@ export const ArticleView = (props: ArticlePageProps) => {
|
||||||
try {
|
try {
|
||||||
setIsCommentsLoading(true)
|
setIsCommentsLoading(true)
|
||||||
await loadReactionsBy({
|
await loadReactionsBy({
|
||||||
by: { shout: props.article.slug },
|
by: { shout: props.article.slug, comment: true },
|
||||||
limit: ARTICLE_COMMENTS_PAGE_SIZE,
|
limit: ARTICLE_COMMENTS_PAGE_SIZE,
|
||||||
offset: getCommentsPage() * ARTICLE_COMMENTS_PAGE_SIZE
|
offset: getCommentsPage() * ARTICLE_COMMENTS_PAGE_SIZE
|
||||||
})
|
})
|
||||||
|
|
|
@ -12,10 +12,18 @@ interface StatMetricsProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
const pseudonames = {
|
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) => {
|
export const StatMetrics = (props: StatMetricsProps) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,32 +1,18 @@
|
||||||
import { gql } from '@urql/core'
|
import { gql } from '@urql/core'
|
||||||
|
|
||||||
export default gql`
|
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) {
|
loadReactionsBy(by: $by, limit: $limit, offset: $offset) {
|
||||||
id
|
id
|
||||||
createdBy {
|
|
||||||
slug
|
|
||||||
name
|
|
||||||
userpic
|
|
||||||
}
|
|
||||||
body
|
|
||||||
kind
|
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
shout {
|
shout {
|
||||||
slug
|
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
replyTo {
|
body
|
||||||
id
|
createdAt
|
||||||
createdBy {
|
createdBy {
|
||||||
slug
|
|
||||||
userpic
|
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
body
|
updatedAt
|
||||||
kind
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user