diff --git a/src/client/actions/fileops.actions.tsx b/src/client/actions/fileops.actions.tsx index b60629d..31040bc 100644 --- a/src/client/actions/fileops.actions.tsx +++ b/src/client/actions/fileops.actions.tsx @@ -112,18 +112,16 @@ export const getComicBooks = (options) => async (dispatch) => { export const importToDB = (payload) => (dispatch) => { try { - const comicBookMetadata = extend( - { - importStatus: { - isImported: true, - tagged: false, - matchedResult: { - score: "0", - }, + const comicBookMetadata = { + importStatus: { + isImported: true, + tagged: false, + matchedResult: { + score: "0", }, }, - { sourcedMetadata: { comicvine: payload } }, - ); + sourcedMetadata: { comicvine: payload }, + }; dispatch({ type: IMS_CV_METADATA_IMPORT_CALL_IN_PROGRESS, }); diff --git a/src/client/components/Card.tsx b/src/client/components/Card.tsx index cfecbc6..80f7935 100644 --- a/src/client/components/Card.tsx +++ b/src/client/components/Card.tsx @@ -38,7 +38,7 @@ class Card extends React.Component { Placeholder image - {this.props.title && ( + {this.props.hasTitle && (
+
- - ); + ); + } else if (!isNil(value.comicvine)) { + return ( +
+
+
+
+
+ +
+
+
    +
  • + {ellipsize(value.name, 18)} +
  • +
  • +
    +
    + + ComicVine ID + + + {value.comicvine.id} + +
    +
    +
  • +
+
+
+
+ ); + } }; const ImportStatus = ({ value }) => { - return `${value.toString()}` ? ( + return value ? ( Imported ) : ( "Not Imported" @@ -86,7 +122,11 @@ export const Library = ({}: IComicBookLibraryProps): ReactElement => { columns: [ { Header: "File Details", - accessor: "rawFileDetails", + id: "fileDetails", + accessor: (row) => + !isNil(row.rawFileDetails) + ? row.rawFileDetails + : row.sourcedMetadata, Cell: RawFileDetails, }, { @@ -301,7 +341,7 @@ export const Library = ({}: IComicBookLibraryProps): ReactElement => {