Skip to content

Commit

Permalink
Fix for scoreboard
Browse files Browse the repository at this point in the history
  • Loading branch information
irdkwmnsb committed Apr 16, 2024
1 parent ac99508 commit 401630d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const ContestantInfo = ({ teamId, roundBR= true, className = null }) => {
const contestInfo = useAppSelector((state) => state.contestInfo.info);
const scoreboardData = useAppSelector((state) => state.scoreboard[SCOREBOARD_TYPES.normal].ids[teamId]);
const awards = useAppSelector((state) => state.scoreboard[SCOREBOARD_TYPES.normal].idAwards[teamId]);
const rank = useAppSelector((state) => state.scoreboard[SCOREBOARD_TYPES.normal].rankById[teamId]);
const rank = useAppSelector((state) => teamId in state.scoreboard[SCOREBOARD_TYPES.normal].rankById && state.scoreboard[SCOREBOARD_TYPES.normal].rankById[teamId]);
const medal = awards?.find((award) => award.type == Award.Type.medal) as Award.medal;
const teamData = useAppSelector((state) => state.contestInfo.info?.teamsId[teamId]);
const formatPenalty = useFormatPenalty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const QueueRow = ({ runInfo,
const teamData = useAppSelector((state) => state.contestInfo.info?.teamsId[runInfo.teamId]);
const probData = useAppSelector((state) => state.contestInfo.info?.problemsId[runInfo.problemId]);
const awards = useAppSelector((state) => state.scoreboard[SCOREBOARD_TYPES.normal].idAwards[runInfo.teamId]);
const rank = useAppSelector((state) => state.scoreboard[SCOREBOARD_TYPES.normal].rankById[runInfo.teamId]);
const rank = useAppSelector((state) => runInfo.teamId in state.scoreboard[SCOREBOARD_TYPES.normal].rankById && state.scoreboard[SCOREBOARD_TYPES.normal].rankById[runInfo.teamId]);
const medal = awards?.find((award) => award.type == Award.Type.medal) as Award.medal;
const isFTSRun = runInfo?.result?.type === "ICPC" && runInfo.result.isFirstToSolveRun || runInfo?.result?.type === "IOI" && runInfo.result.isFirstBestRun;
return <StyledQueueRow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const ScoreboardRow = ({ teamId,
const contestData = useAppSelector((state) => state.contestInfo.info);
const teamData = useAppSelector((state) => state.contestInfo.info?.teamsId[teamId]);
const awards: Award[] = useAppSelector((state) => state.scoreboard[SCOREBOARD_TYPES.normal].idAwards[teamId]);
const rank = useAppSelector((state) => state.scoreboard[SCOREBOARD_TYPES.normal].rankById[teamId]);
const rank = useAppSelector((state) => teamId in state.scoreboard[SCOREBOARD_TYPES.normal].rankById && state.scoreboard[SCOREBOARD_TYPES.normal].rankById[teamId]);
const medal = awards?.find((award) => award.type == Award.Type.medal) as Award.medal;
const needPenalty = useNeedPenalty();
const formatPenalty = useFormatPenalty();
Expand Down

0 comments on commit 401630d

Please sign in to comment.