import * as I from "csgogsi"; import { Timer } from "./MatchBar"; import TeamLogo from './TeamLogo'; import PlantDefuse from "../Timers/PlantDefuse" import { onGSI } from "../../API/contexts/actions"; import WinAnnouncement from "./WinIndicator"; import { useState } from "react"; interface IProps { orientation: "left" | "right"; timer: Timer | null; team: I.Team; } const TeamScore = ({orientation, timer, team }: IProps) => { const [ show, setShow ] = useState(false); onGSI("roundEnd", result => { if(result.winner.orientation !== orientation) return; setShow(true); setTimeout(() => { setShow(false); }, 5000); }, [orientation]); return ( <>
{team?.name || null}
); } export default TeamScore;