diff --git a/front/src/AuthorForm.vue b/front/src/AuthorForm.vue index 2b086ca..5c16d82 100644 --- a/front/src/AuthorForm.vue +++ b/front/src/AuthorForm.vue @@ -2,29 +2,38 @@ import { ref } from 'vue' import { getAuthor } from './api.js' import { onBeforeRouteUpdate } from 'vue-router' + import SearchBook from './SearchBook.vue' const props = defineProps({ id: String }); - let data = ref(null); - let error = ref(null); + let author = ref(null); + let authorfetcherror = ref(null); - getAuthor(data, error, props.id); + getAuthor(author, authorfetcherror, props.id); onBeforeRouteUpdate(async (to, from) => { - getAuthor(data, error, to.params.id); + getAuthor(author, authorfetcherror, to.params.id); }) diff --git a/front/src/SearchBook.vue b/front/src/SearchBook.vue index 486336d..7cf8f44 100644 --- a/front/src/SearchBook.vue +++ b/front/src/SearchBook.vue @@ -1,7 +1,7 @@