From b237d2a32dd63ca7e71a35607a372bd649149a00 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Tue, 8 Mar 2022 00:54:42 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fixing=20up=20the=20UI=20on=20th?= =?UTF-8?q?e=20library=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/components/Library/Library.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/client/components/Library/Library.tsx b/src/client/components/Library/Library.tsx index b40101d..f9ca83f 100644 --- a/src/client/components/Library/Library.tsx +++ b/src/client/components/Library/Library.tsx @@ -54,7 +54,7 @@ export const Library = (data: IComicBookLibraryProps): ReactElement => { Header: "File Details", id: "fileDetails", accessor: (row) => - !isEmpty(row._source.rawFileDetails.cover) + !isEmpty(row._source.rawFileDetails) ? row._source.rawFileDetails : row._source.sourcedMetadata, Cell: ({ value }) => { @@ -77,16 +77,20 @@ export const Library = (data: IComicBookLibraryProps): ReactElement => { ], }, { - Header: "ComicVine Metadata", + Header: "Additional Metadata", columns: [ { Header: "Issue #", - accessor: "_source.sourcedMetadata", + accessor: "_source.inferredMetadata.issue", Cell(props) { return ( - !isUndefined(props.cell.value) && - !isUndefined(props.cell.value.comicvine) && ( -
{props.cell.value.comicvine.issue_number}
+ !isUndefined(props.cell.value) && ( +
+
+ Inferred + {props.cell.value.number} +
+
) ); },