Newer
Older
taehui / qwilight-fe / src / etc / TotalEdgesView.tsx
@Taehui Taehui on 16 Mar 578 bytes 2024-03-17 오전 2:53
import EdgeItem from "@/etc/EdgeItem";
import { EtcAPIEdge } from "@/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>
  );
}