Use the same widget for books everywhere

This commit is contained in:
2026-03-27 22:08:24 +01:00
parent 726c640657
commit e05c9f2b45
17 changed files with 70 additions and 146 deletions

View File

@@ -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