Skip to content

Commit

Permalink
feat: improve "saved posts" usability
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Oct 5, 2021
1 parent ac38f59 commit d15d7c7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pages/premium/saved-posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</template>
</ul>

<PostsControls />
<PostsControls :current-page="currentPage" @setPage="onPageChange" />
</main>
</template>

Expand All @@ -39,6 +39,7 @@ export default {
data() {
return {
selectedBooru: '<All Boorus>',
currentPage: 0,
}
},
Expand Down Expand Up @@ -103,7 +104,7 @@ export default {
const PAGINATED_SAVED_POSTS = paginateArray(
SAVED_POSTS,
POSTS_PER_PAGE,
this.$route.query.page || 0
this.currentPage
)
return PAGINATED_SAVED_POSTS
Expand All @@ -113,6 +114,12 @@ export default {
methods: {
onDomainChange(DOMAIN) {
this.selectedBooru = DOMAIN
this.currentPage = 0
},
onPageChange(page) {
this.currentPage = page
},
sortPostsByDate(POSTS) {
Expand Down

0 comments on commit d15d7c7

Please sign in to comment.