Skip to content

Commit 55bd621

Browse files
authored
Merge pull request #1216 from kenkoooo/pr/Aosanori/1106
merge #1106
2 parents eaf5f89 + 456486f commit 55bd621

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

atcoder-problems-frontend/src/pages/TablePage/AtCoderRegularTable.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ const getProblemHeaderAlphabet = (problem: MergedProblem, contest: Contest) => {
4141
if (
4242
problem.problem_index === "H" &&
4343
classifyContest(contest).startsWith("ABC")
44-
)
45-
return "Ex";
44+
) {
45+
return "H/Ex";
46+
}
4647
return problem.problem_index;
4748
};
4849

@@ -89,6 +90,7 @@ const AtCoderRegularTableSFC: React.FC<Props> = (props) => {
8990
return [alphabet, status];
9091
})
9192
);
93+
9294
const rowColor = combineTableColorList({
9395
colorMode,
9496
colorList: problemStatusList.map(({ cellColor }) => cellColor),
@@ -112,16 +114,13 @@ const AtCoderRegularTableSFC: React.FC<Props> = (props) => {
112114
);
113115

114116
const headerList = props.contests
115-
.flatMap((contest) =>
116-
(props.contestToProblems.get(contest.id) ?? []).map((problem) =>
117-
getProblemHeaderAlphabet(problem, contest)
118-
)
119-
)
117+
.flatMap((contest) => {
118+
const problems = props.contestToProblems.get(contest.id) ?? [];
119+
return problems.map((p) => getProblemHeaderAlphabet(p, contest));
120+
})
120121
.filter((alphabet) => alphabet.length > 0);
121122

122-
let header = Array.from(new Set(headerList)).sort();
123-
if (header.includes("Ex"))
124-
header = header.filter((c) => c != "Ex").concat("Ex");
123+
const header = Array.from(new Set(headerList)).sort();
125124

126125
return (
127126
<Row className="my-4">

0 commit comments

Comments
 (0)