// Generated with util/create-component.js import React, { memo } from "react"; import Heading from "../../UI/Heading"; import { MinusCircle, PlusCircle } from "../../UI/Icon"; import { ITitleWithEvaluationProps, TSentimentType, } from "./TitleWithEvaluation.types"; export const scoreColorMap: { [key: number]: string } = { 0: "#FF9900", 1: "#FF9900", 2: "#FFBC00", 3: "#06DB75", 4: "#36B7FF", 5: "#256FFF", }; const IconComponent = ({ sentimentType, }: { sentimentType: TSentimentType; }) => { if (sentimentType === "positive") { return ; } else if (sentimentType === "negative") { return ; } else { return (
); } }; const TitleWithEvaluation = ({ titleKey, title, score, count, contentList, }: ITitleWithEvaluationProps) => { const scoreColor = score >= 4 ? scoreColorMap[Math.round(score)] : scoreColorMap[Math.floor(score)]; return (
{titleKey}

{title}

{score > 5 ? 5 : score}

/5

{count > 0 && (
{contentList.map(({ sentimentType, content }) => { return (

{content}

); })}
)}
); }; export default memo(TitleWithEvaluation);