From ab99f5ff36ea7a5d198e816930bd0de57ecae778 Mon Sep 17 00:00:00 2001 From: Ryan McCartney Date: Thu, 4 Dec 2025 22:23:13 +0000 Subject: [PATCH 1/2] Fix no book found add button --- frontend/src/components/NoEbookFound.jsx | 2 +- frontend/src/components/NotFound.jsx | 12 ++++++++---- frontend/src/routes/books.jsx | 9 ++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) 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; From e9720e9ab6064df8ffdfd70e21c5f6a8a4d4867a Mon Sep 17 00:00:00 2001 From: Ryan McCartney Date: Thu, 4 Dec 2025 22:26:17 +0000 Subject: [PATCH 2/2] Fix formatting --- frontend/src/routes/scan.jsx | 1 - 1 file changed, 1 deletion(-) 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(() => {