Newer
Older
taehui / qwilight-fe / src / app / [language] / etc / components / TotalTitlesView.tsx
@Taehui Taehui on 17 Mar 669 bytes 2024-03-17 오후 2:12
import TitleItem from "@/app/[language]/etc/components/TitleItem";
import { EtcAPITitle } from "@/type/wwwAPI";
import { useTranslations } from "next-intl";
import { Badge, ListGroup } from "reactstrap";

export default function TotalTitlesView({
  totalTitles,
}: {
  totalTitles: EtcAPITitle[];
}) {
  const t = useTranslations();

  return (
    <ListGroup>
      <Badge>{t("etcTotalTitles")}</Badge>
      {totalTitles.map(({ title, titleColor, value }) => (
        <TitleItem
          key={title}
          title={title}
          titleColor={titleColor}
          text={t("avatarCountText", { avatarCount: value })}
        />
      ))}
    </ListGroup>
  );
}