Use the same widget for books everywhere
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import BookCard from './BookCard.vue'
|
||||
import { getMyBooks } from './api.js'
|
||||
import BookListElement from './BookListElement.vue'
|
||||
import Pagination from './Pagination.vue'
|
||||
|
||||
const FilterStates = Object.freeze({
|
||||
@@ -10,7 +10,7 @@ const FilterStates = Object.freeze({
|
||||
READING: 'reading',
|
||||
})
|
||||
|
||||
const limit = 6
|
||||
const limit = 5
|
||||
const pageNumber = ref(1)
|
||||
|
||||
const offset = computed(() => (pageNumber.value - 1) * limit)
|
||||
@@ -76,7 +76,7 @@ function pageChange(newPageNumber) {
|
||||
<div v-else-if="data">
|
||||
<div class="">
|
||||
<div class="" v-for="book in data.books" :key="book.id">
|
||||
<BookCard v-bind="book" />
|
||||
<BookListElement v-bind="book" />
|
||||
</div>
|
||||
</div>
|
||||
<Pagination
|
||||
|
||||
Reference in New Issue
Block a user