Add open library API call when search has no result
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
const props = defineProps({
|
||||
id: Number,
|
||||
openlibraryid: String,
|
||||
title: String,
|
||||
author: String,
|
||||
rating: Number,
|
||||
@@ -27,7 +28,11 @@ async function onUserBookRead() {
|
||||
}
|
||||
|
||||
function openBook() {
|
||||
router.push(`/book/${props.id}`)
|
||||
if (props.id != 0) {
|
||||
router.push(`/book/${props.id}`);
|
||||
} else {
|
||||
console.log("Open Library Id : " + props.openlibraryid);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user