From 0a315b1ef9f59ffbef94afea55af13c7a5a5b74d Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Wed, 6 Apr 2022 23:08:53 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Cleaned=20up=20the=20deck/descri?= =?UTF-8?q?ption=20for=20CV=20sourced=20volumes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ComicDetail/Tabs/VolumeInformation.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/client/components/ComicDetail/Tabs/VolumeInformation.tsx b/src/client/components/ComicDetail/Tabs/VolumeInformation.tsx index ce38efe..fbbee27 100644 --- a/src/client/components/ComicDetail/Tabs/VolumeInformation.tsx +++ b/src/client/components/ComicDetail/Tabs/VolumeInformation.tsx @@ -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} /> -
+
+ {!isEmpty(data.sourcedMetadata.comicvine.description) && + convert(data.sourcedMetadata.comicvine.description, { + baseElements: { + selectors: ["p"], + }, + })} +
);