// Generated with util/create-component.js import React, { memo } from "react"; import Heading from "../../UI/Heading"; import { DoubleQuotationMarksForEnding, DoubleQuotationMarksForStarting, } from "../../UI/Icon"; import Text from "../../UI/Text"; import { IReviewEvaluationListProps, TSentimentType, } from "./ReviewEvaluationList.types"; const IconComponent = ({ sentimentType, }: { sentimentType: TSentimentType; }) => { if (sentimentType === "positive") { return ( 😊 ); } else if (sentimentType === "negative") { return ( 🤔 ); } else { return null; } }; const ReviewEvaluationList = ({ mainTitle, articleList, }: IReviewEvaluationListProps) => { return (
{mainTitle}
{articleList.map( ({ sentimentType, articleTitle, articleColor, textCount, textList, }) => { return (
{articleTitle}
{textList.map((text, index) => { if (index + 1 > textCount || text === "") { return null; } return (
{text}
); })}
); } )}
); }; export default memo(ReviewEvaluationList);