import EdgeItem from "@/etc/EdgeItem"; import { EtcAPIEdge } from "@/wwwAPI"; import { useTranslations } from "next-intl"; import { Badge, ListGroup } from "reactstrap"; import { sprintf } from "sprintf-js"; 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={sprintf(t("avatarCountText"), value)} /> ))} </ListGroup> ); }