diff --git a/frontend/src/components/NoEbookFound.jsx b/frontend/src/components/NoEbookFound.jsx index bbf735b..5ed5d86 100755 --- a/frontend/src/components/NoEbookFound.jsx +++ b/frontend/src/components/NoEbookFound.jsx @@ -17,7 +17,7 @@ const NoEbookFound = ({ bookId }) => { color={grey[500]} variant="h3" > - {"This is no eBook for this title"} + {"There is no eBook for this title"} {}, }) => { const handleClick = async () => { - const data = await fetcher.post(`${link}`, { - name: `A new ${label}`, + const response = await fetcher.post(`${link}`, { + ...{ + name: `A new ${label}`, + }, + ...data, }); - if (data.shelf) { - enqueueSnackbar(`Created a ${label} called ${data.shelf.name}`); + if (response.shelf) { + enqueueSnackbar(`Created a ${label} called ${response.shelf.name}`); } mutate(); diff --git a/frontend/src/routes/books.jsx b/frontend/src/routes/books.jsx index f2d56ca..444c03b 100755 --- a/frontend/src/routes/books.jsx +++ b/frontend/src/routes/books.jsx @@ -28,7 +28,14 @@ const BooksList = ({ filter }) => { } if (bookCards.length === 0) { - return ; + return ( + + ); } return bookCards; diff --git a/frontend/src/routes/scan.jsx b/frontend/src/routes/scan.jsx index 5d16c67..a83ba20 100755 --- a/frontend/src/routes/scan.jsx +++ b/frontend/src/routes/scan.jsx @@ -72,7 +72,6 @@ const Scan = () => { const id = setInterval(processImage, 100); return () => clearInterval(id); - }, [barcode]); useEffect(() => {