queries fixes

This commit is contained in:
tonyrewin 2022-09-20 11:26:12 +03:00
parent 374bbc8e0f
commit 9a95f26152
4 changed files with 12 additions and 3 deletions

View File

@ -73,6 +73,15 @@ export const TopicCard = (props: TopicProps) => {
t('author') +
plural(topic().stat?.authors || 0, locale() === 'ru' ? ['ов', '', 'а'] : ['s', '', 's'])}
</span>
<span class="topic-details__item" classList={{ compact: props.compact }}>
{topic().stat?.followers +
' ' +
t('follower') +
plural(
topic().stat?.followers || 0,
locale() === 'ru' ? ['ов', '', 'а'] : ['s', '', 's']
)}
</span>
{/*FIXME*/}
{/*<Show when={false && !props.subscribeButtonBottom}>*/}
{/* <span class='topic-details__item'>*/}

View File

@ -1,7 +1,7 @@
import { gql } from '@urql/core'
export default gql`
query ReactionsByShoutQuery($slug: String!, $limit: String!, $limit: Int!, $offset: Int!) {
query ReactionsByShoutQuery($slug: String!, $limit: Int!, $offset: Int!) {
reactionsByShout(slug: $slug, limit: $limit, offset: $offset) {
id
body

View File

@ -3,7 +3,7 @@ import { gql } from '@urql/core'
// WARNING: need Auth header
export default gql`
query ShoutsReactedByUserQuery($limit: String!, $limit: Int!, $offset: Int!) {
query ShoutsReactedByUserQuery($slug: String!, $limit: Int!, $offset: Int!) {
userReactedShouts(slug: String!, page: Int!, size: Int!) {
_id: slug
title

View File

@ -223,7 +223,7 @@ export const apiClient = {
})
.toPromise()
return response.data.reactionsByShout
return response.data.reactionsForShouts
},
getArticleReactions: async ({
articleSlug,