import React, { ReactElement } from "react"; import MatchResult from "./MatchResult"; import { isEmpty } from "lodash"; import { useStore } from "../../store"; import { useShallow } from "zustand/react/shallow"; interface ComicVineMatchPanelProps { props: { comicObjectId: string; comicVineMatches: any[]; queryClient?: any; onMatchApplied?: () => void; }; } /** Displays ComicVine search results or a status message while searching. */ export const ComicVineMatchPanel = ({ props: comicVineData }: ComicVineMatchPanelProps): ReactElement => { const { comicObjectId, comicVineMatches, queryClient, onMatchApplied } = comicVineData; const { comicvine } = useStore( useShallow((state) => ({ comicvine: state.comicvine, })), ); return ( <>
{!isEmpty(comicVineMatches) ? ( ) : ( <>

ComicVine match results are an approximation.

Auto-matching is not available yet. If you see no results or poor quality ones, you can override the search query parameters to get better ones.

{comicvine.scrapingStatus}
)}
); }; export default ComicVineMatchPanel;