From aeb6e5225ddfa298d4b8f177f9274d98169f55e2 Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Wed, 1 Jun 2022 23:17:53 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=8E=20CV=20search=20results=20prettifi?= =?UTF-8?q?cation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/components/Dashboard/PullList.tsx | 2 +- .../components/Dashboard/RecentlyImported.tsx | 9 ++ src/client/components/MatchResult.tsx | 2 +- src/client/components/Search.tsx | 94 +++++++++++++------ 4 files changed, 78 insertions(+), 29 deletions(-) diff --git a/src/client/components/Dashboard/PullList.tsx b/src/client/components/Dashboard/PullList.tsx index 249ad25..7377ad3 100644 --- a/src/client/components/Dashboard/PullList.tsx +++ b/src/client/components/Dashboard/PullList.tsx @@ -20,7 +20,7 @@ export const PullList = ({ issues }: PullListProps): ReactElement => { useEffect(() => { dispatch( getWeeklyPullList({ - startDate: "2022-2-11", + startDate: "2022-6-1", pageSize: "15", currentPage: "1", }), diff --git a/src/client/components/Dashboard/RecentlyImported.tsx b/src/client/components/Dashboard/RecentlyImported.tsx index 8e0e619..3539736 100644 --- a/src/client/components/Dashboard/RecentlyImported.tsx +++ b/src/client/components/Dashboard/RecentlyImported.tsx @@ -95,6 +95,15 @@ export const RecentlyImported = ({ /> )} + {/* ComicVine metadata presence */} + {isComicBookMetadataAvailable && ( + + {"ComicInfo.xml + + )} {/* Issue type */} {isComicBookMetadataAvailable && !isNil( diff --git a/src/client/components/MatchResult.tsx b/src/client/components/MatchResult.tsx index 16f4a3c..32f11e3 100644 --- a/src/client/components/MatchResult.tsx +++ b/src/client/components/MatchResult.tsx @@ -34,7 +34,7 @@ export const MatchResult = (props: MatchResultProps) => { }); } return ( -
+
{ format: "json", limit: "10", offset: "0", - field_list: "id,name,deck,api_detail_url,image,description,volume", + field_list: + "id,name,deck,api_detail_url,image,description,volume,cover_date", resources: "issue", }, }), @@ -85,34 +89,70 @@ export const Search = ({}: ISearchProps): ReactElement => { /> {!isNil(comicVineSearchResults.results) && !isEmpty(comicVineSearchResults.results) ? ( -
+
{comicVineSearchResults.results.map((result) => { return ( -
-
- -
-
-
{result.name}
- {result.id} -

{result.api_detail_url}

-

- +
+
+
+ +
+
+
+ {!isEmpty(result.name) ? ( + result.name + ) : ( + No Name + )} +
+
+
+
+ Cover date + + {dayjs(result.cover_date).format("MMM D, YYYY")} + +
+
+ +
+
+ + {result.id} + +
+
+
+ + + {result.api_detail_url} + +

+ {ellipsize( + convert(result.description, { + baseElements: { + selectors: ["p"], + }, + }), + 320, + )} +

+ +
);