From df1fbc7dd3f90135b5ed782ef7b3c660ce186a4d Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Thu, 29 Dec 2022 23:33:23 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fixed=20empty=20library=20state?= =?UTF-8?q?=20with=20explanation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Dashboard/RecentlyImported.tsx | 2 -- src/client/components/Library/Library.tsx | 23 ++++++++++++++++--- src/client/components/Navbar.tsx | 8 +++++++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/client/components/Dashboard/RecentlyImported.tsx b/src/client/components/Dashboard/RecentlyImported.tsx index 8b64b50..8516b14 100644 --- a/src/client/components/Dashboard/RecentlyImported.tsx +++ b/src/client/components/Dashboard/RecentlyImported.tsx @@ -51,7 +51,6 @@ export const RecentlyImported = ({ }, idx, ) => { - console.log(comicvine); const { issueName, url } = determineCoverFile({ rawFileDetails, comicvine, @@ -63,7 +62,6 @@ export const RecentlyImported = ({ comicInfo, locg, }); - console.log(name); const isComicBookMetadataAvailable = !isUndefined(comicvine) && !isUndefined(comicvine.volumeInformation); diff --git a/src/client/components/Library/Library.tsx b/src/client/components/Library/Library.tsx index 107023f..0366e80 100644 --- a/src/client/components/Library/Library.tsx +++ b/src/client/components/Library/Library.tsx @@ -208,14 +208,13 @@ export const Library = (): ReactElement => { // ImportStatus.propTypes = { // value: PropTypes.bool.isRequired, // }; - return (

Library

- {!isUndefined(searchResults.hits) && ( + {!isEmpty(searchResults) ? (
{ />
- )} + ):
+
+
+
+ No comics were found in the library, Elasticsearch reports no + indices. Try importing a few comics into the library and come + back. +
+
+
+              {!isUndefined(searchError.data) &&
+                JSON.stringify(
+                  searchError.data.meta.body.error.root_cause,
+                  null,
+                  4,
+                )}
+            
+
+
}
); diff --git a/src/client/components/Navbar.tsx b/src/client/components/Navbar.tsx index c7c6999..db66d98 100644 --- a/src/client/components/Navbar.tsx +++ b/src/client/components/Navbar.tsx @@ -84,6 +84,14 @@ const Navbar: React.FunctionComponent = (props) => { ) : null} + {/* AirDC++ socket connection status */} +
+ + + +
+ +
Blog