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
contributions(first: $first, offset: $offset) {
contributions(first: $first, offset: $offset, orderBy: createdAt_desc) {
id
slug
title
contentExcerpt
shoutedCount
commentsCount
deleted
image
createdAt
author {

View File

@ -179,7 +179,7 @@
</ds-card>
</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%' }"
:key="post.id">
<hc-post-card
@ -192,7 +192,8 @@
margin-top="large"
style="text-align: center">
<ds-button
icon="arrow-down"
:icon="$apollo.loading ? 'spinner' : 'arrow-down'"
:disabled="$apollo.loading"
ghost
@click="showMoreContributions">
mehr laden