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

export default function TotalEdgesView({
  totalEdges,
}: {
  totalEdges: EtcAPIEdge[];
}) {
  const t = useTranslations();

  return (
    <ListGroup>
      <Badge>{t("etcTotalEdges")}</Badge>
      {totalEdges.map(({ edge, value }) => (
        <EdgeItem
          key={edge}
          edge={edge}
          text={t("avatarCountText", { avatarCount: value })}
        />
      ))}
    </ListGroup>
  );
}