Skip to content

Commit 85d0aba

Browse files
authored
Merge pull request #1097 from cupro29/fix_virtual_contest_acceptances
参加していない VirtualContest に提出結果を表示しない
2 parents e850409 + 6a9b403 commit 85d0aba

File tree

1 file changed

+3
-1
lines changed
  • atcoder-problems-frontend/src/pages/Internal/VirtualContest/ShowContest

1 file changed

+3
-1
lines changed

atcoder-problems-frontend/src/pages/Internal/VirtualContest/ShowContest/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ import {
6060
} from "./ResultCalcUtil";
6161

6262
const Problems = (props: {
63+
readonly alreadyJoined: boolean;
6364
readonly problems: VirtualContestProblem[];
6465
readonly atCoderUserId: UserId;
6566
readonly start: number;
6667
readonly end: number;
6768
}) => {
69+
const { alreadyJoined } = props;
6870
const submissions = useVirtualContestSubmissions(
6971
[props.atCoderUserId],
7072
props.problems.map((p) => p.item.id),
@@ -84,7 +86,7 @@ const Problems = (props: {
8486
: new Map<UserId, ReducedProblemResult>();
8587
const ResultIcon = (props: { id: ProblemId }) => {
8688
const result = results.get(props.id);
87-
if (!result) return null;
89+
if (!alreadyJoined || !result) return null;
8890
if (result.accepted) {
8991
return <FcCheckmark />;
9092
} else {

0 commit comments

Comments
 (0)