import * as I from "csgogsi"; import { Match } from "../../API/types"; interface Props { map: I.Map; match: Match | null; } const SeriesBox = ({ map, match }: Props) => { const amountOfMaps = (match && Math.floor(Number(match.matchType.substr(-1)) / 2) + 1) || 0; const bo = (match && Number(match.matchType.substr(-1))) || 0; const left = map.team_ct.orientation === "left" ? map.team_ct : map.team_t; const right = map.team_ct.orientation === "left" ? map.team_t : map.team_ct; return (
{new Array(amountOfMaps).fill(0).map((_, i) => (
i ? "win" : ""} ${left.side}`} /> ))}
{ bo ? `BEST OF ${bo}` : '' }
{new Array(amountOfMaps).fill(0).map((_, i) => (
i ? "win" : ""} ${right.side}`} /> ))}
); } export default SeriesBox;