import { useState } from "react"; import "./radar.scss"; import { Match, Veto } from "../../API/types"; import { Map, CSGO, Team } from 'csgogsi'; import Radar from './Radar' import { useAction } from "../../API/contexts/actions"; interface Props { match: Match | null, map: Map, game: CSGO } const RadarMaps = ({ match, map, game }: Props) => { const [ radarSize, setRadarSize ] = useState(366); const [ showBig, setShowBig ] = useState(false); useAction('radarBigger', () => { setRadarSize(p => p+10); }, []); useAction('radarSmaller', () => { setRadarSize(p => p-10); }, []); useAction('toggleRadarView', () => { setShowBig(p => !p); }, []); return (
{match ? : null}
); } export default RadarMaps; const MapsBar = ({ match, map }: Props) => { if (!match || !match.vetos.length) return ''; const picks = match.vetos.filter(veto => veto.type !== "ban" && veto.mapName); if (picks.length > 3) { const current = picks.find(veto => map.name.includes(veto.mapName)); if (!current) return null; return
Best of {match.matchType.replace("bo", "")}
{}
} return
Best of {match.matchType.replace("bo", "")}
{match.vetos.filter(veto => veto.type !== "ban").filter(veto => veto.teamId || veto.type === "decider").map(veto => )}
} const MapEntry = ({ veto, map }: { veto: Veto, map: Map, team: Team | null }) => { return
{veto.mapName.replace("de_", "")}
}