improved pagination on profile page

This commit is contained in:
Grzegorz Leoniec 2018-10-26 14:48:17 +02:00
parent 09b4b707bc
commit a26937d093
2 changed files with 5 additions and 3 deletions

View File

@ -52,13 +52,14 @@ export default gql(`
} }
} }
contributionsCount contributionsCount
contributions(first: $first, offset: $offset) { contributions(first: $first, offset: $offset, orderBy: createdAt_desc) {
id id
slug slug
title title
contentExcerpt contentExcerpt
shoutedCount shoutedCount
commentsCount commentsCount
deleted
image image
createdAt createdAt
author { author {

View File

@ -179,7 +179,7 @@
</ds-card> </ds-card>
</ds-flex-item> </ds-flex-item>
<ds-flex-item <ds-flex-item
v-for="post in user.contributions" v-for="post in user.contributions.filter(post => !post.deleted)"
:width="{ base: '100%', md: '100%', xl: '50%' }" :width="{ base: '100%', md: '100%', xl: '50%' }"
:key="post.id"> :key="post.id">
<hc-post-card <hc-post-card
@ -192,7 +192,8 @@
margin-top="large" margin-top="large"
style="text-align: center"> style="text-align: center">
<ds-button <ds-button
icon="arrow-down" :icon="$apollo.loading ? 'spinner' : 'arrow-down'"
:disabled="$apollo.loading"
ghost ghost
@click="showMoreContributions"> @click="showMoreContributions">
mehr laden mehr laden