import React, { CSSProperties, FC } from "react"; import { getFormat } from "@/utils/getFormat"; interface Info { episodes?: number; averageScore?: number; format?: string; status?: string; } interface InfoChipProps { info: Info; color: any; className: string; } const InfoChip: FC = ({ info, color, className }) => { return (
{info?.episodes && (
{info?.episodes} Episodes
)} {info?.averageScore && (
{info?.averageScore}%
)} {info?.format && (
{getFormat(info?.format)}
)} {info?.status && (
{info?.status}
)}
); }; export default InfoChip;