import React, { useCallback } from "react"; import { isNil, map } from "lodash"; import { applyComicVineMatch } from "../../actions/comicinfo.actions"; import { convert } from "html-to-text"; import ellipsize from "ellipsize"; interface MatchResultProps { matchData: any; comicObjectId: string; } const handleBrokenImage = (e) => { e.target.src = "http://localhost:3050/dist/img/noimage.svg"; }; export const MatchResult = (props: MatchResultProps) => { const applyCVMatch = useCallback( // (match, comicObjectId) => { // dispatch(applyComicVineMatch(match, comicObjectId)); // }, [], ); return ( <> {map(props.matchData, (match, idx) => { let issueDescription = ""; if (!isNil(match.description)) { issueDescription = convert(match.description, { baseElements: { selectors: ["p"], }, }); } return (