diff --git a/src/client/components/ComicDetail/ComicDetail.tsx b/src/client/components/ComicDetail/ComicDetail.tsx index 477b7fc..afa107b 100644 --- a/src/client/components/ComicDetail/ComicDetail.tsx +++ b/src/client/components/ComicDetail/ComicDetail.tsx @@ -295,7 +295,9 @@ export const ComicDetail = (data: ComicDetailProps): ReactElement => { { id: 1, name: "Volume Information", - icon: , + icon: ( + + ), content: isComicBookMetadataAvailable ? ( ) : null, diff --git a/src/client/components/ComicDetail/ComicVineDetails.tsx b/src/client/components/ComicDetail/ComicVineDetails.tsx index aa57422..b1cce81 100644 --- a/src/client/components/ComicDetail/ComicVineDetails.tsx +++ b/src/client/components/ComicDetail/ComicVineDetails.tsx @@ -2,105 +2,105 @@ import React, { ReactElement } from "react"; import PropTypes from "prop-types"; import { detectIssueTypes } from "../../shared/utils/tradepaperback.utils"; import dayjs from "dayjs"; -import { isUndefined } from "lodash"; +import { isEmpty, isUndefined } from "lodash"; import Card from "../shared/Carda"; +import { convert } from "html-to-text"; + export const ComicVineDetails = (props): ReactElement => { const { data, updatedAt } = props; return ( -
-
-
-
ComicVine Metadata
-
- Last scraped on {dayjs(updatedAt).format("MMM D YYYY [at] h:mm a")} -
- -
-
-
- -
-
-
-
-
{data.name}
-
-
- Is a part of{" "} - - {data.volumeInformation.name} - -
- -
- Published by - - {" "} - {data.volumeInformation.publisher.name} - -
-
- Total issues in this volume: - {data.volumeInformation.count_of_issues} -
- -
-
- {data.issue_number && ( -
-
- Issue Number - - {data.issue_number} - -
-
- )} - {!isUndefined( - detectIssueTypes(data.volumeInformation.description), - ) ? ( -
-
- Detected Type - - { - detectIssueTypes( - data.volumeInformation.description, - ).displayName - } - -
-
- ) : data.resource_type ? ( -
-
- Type - - {data.resource_type} - -
-
- ) : null} -
-
- - ComicVine Issue ID - - {data.id} -
-
+
+
+
+
+
+ +
+
+
+
+ {/* Title */} +
+
{data.name}
+
+ Is a part of{" "} + + {data.volumeInformation.name} +
-
-
+
+ + {/* Comicvine metadata */} +
+
ComicVine Metadata
+
+ Last scraped on{" "} + {dayjs(updatedAt).format("MMM D YYYY [at] h:mm a")} +
+
+ ComicVine Issue ID + {data.id} +
+
+
+ + {/* Publisher details */} +
+ Published by{" "} + {data.volumeInformation.publisher.name} +
+ Total issues in this volume{" "} + + + {data.volumeInformation.count_of_issues} + + +
+
+ {data.issue_number && ( +
+ Issue Number + {data.issue_number} +
+ )} + {!isUndefined( + detectIssueTypes(data.volumeInformation.description), + ) ? ( +
+ Detected Type + + { + detectIssueTypes(data.volumeInformation.description) + .displayName + } + +
+ ) : data.resource_type ? ( +
+ Type + {data.resource_type} +
+ ) : null} +
+
+
+ {/* Description */} +
+ {!isEmpty(data.description) && + convert(data.description, { + baseElements: { + selectors: ["p"], + }, + })}
- - + + ); diff --git a/src/client/components/ComicDetail/Tabs/VolumeInformation.tsx b/src/client/components/ComicDetail/Tabs/VolumeInformation.tsx index fbbee27..5bb28e0 100644 --- a/src/client/components/ComicDetail/Tabs/VolumeInformation.tsx +++ b/src/client/components/ComicDetail/Tabs/VolumeInformation.tsx @@ -1,30 +1,15 @@ import React, { ReactElement } from "react"; import ComicVineDetails from "../ComicVineDetails"; -import { convert } from "html-to-text"; -import { isEmpty } from "lodash"; export const VolumeInformation = (props): ReactElement => { const { data } = props; - const createDescriptionMarkup = (html) => { - return { __html: html }; - }; return (
-
- -
- {!isEmpty(data.sourcedMetadata.comicvine.description) && - convert(data.sourcedMetadata.comicvine.description, { - baseElements: { - selectors: ["p"], - }, - })} -
-
+
); };