🧹 Cleaned up the deck/description for CV sourced volumes
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
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;
|
||||
@@ -14,12 +16,14 @@ export const VolumeInformation = (props): ReactElement => {
|
||||
data={data.sourcedMetadata.comicvine}
|
||||
updatedAt={data.updatedAt}
|
||||
/>
|
||||
<div
|
||||
className="column is-8"
|
||||
dangerouslySetInnerHTML={createDescriptionMarkup(
|
||||
data.sourcedMetadata.comicvine.volumeInformation.description,
|
||||
)}
|
||||
></div>
|
||||
<div className="column is-8">
|
||||
{!isEmpty(data.sourcedMetadata.comicvine.description) &&
|
||||
convert(data.sourcedMetadata.comicvine.description, {
|
||||
baseElements: {
|
||||
selectors: ["p"],
|
||||
},
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user