diff --git a/front/src/AddBookToCollection.vue b/front/src/AddBookToCollection.vue new file mode 100644 index 0000000..0a7fd79 --- /dev/null +++ b/front/src/AddBookToCollection.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/front/src/CollectionForm.vue b/front/src/CollectionForm.vue index 7636d01..dbd9042 100644 --- a/front/src/CollectionForm.vue +++ b/front/src/CollectionForm.vue @@ -2,6 +2,7 @@ import { computed, ref } from 'vue' import { getCollection } from './api.js' import CollectionFormBookItem from './CollectionFormBookItem.vue' +import AddBookToCollection from './AddBookToCollection.vue' import Pagination from './Pagination.vue' const props = defineProps({ @@ -27,14 +28,20 @@ getCollection(data, error, props.id, limit, offset.value) function pageChange(newPageNumber) { pageNumber.value = newPageNumber data.value = null + error.value = null getCollection(data, error, props.id, limit, offset.value) } + +function fetchCollection() { + pageChange(1) +}