Skip to content

Commit 9d9ec20

Browse files
変数selectedContestCategoriesの移動
1 parent 1b61725 commit 9d9ec20

File tree

1 file changed

+6
-7
lines changed
  • atcoder-problems-frontend/src/pages/TablePage

1 file changed

+6
-7
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ export const TablePage: React.FC<OuterProps> = (props) => {
5858
false
5959
);
6060
const [selectedLanguages, setSelectedLanguages] = useState(new Set<string>());
61-
62-
const selectedContestCategories = [activeTab];
63-
const likeContestCategory = getLikeContestCategory(activeTab);
64-
if (likeContestCategory && mergeLikeContest) {
65-
selectedContestCategories.push(likeContestCategory);
66-
}
67-
6861
const userRatingInfo = useRatingInfo(props.userId);
6962
const contestToProblems =
7063
useContestToMergedProblems() ?? new Map<ContestId, MergedProblem[]>();
@@ -88,6 +81,12 @@ export const TablePage: React.FC<OuterProps> = (props) => {
8881
filteredSubmissions,
8982
props.userId
9083
);
84+
85+
const selectedContestCategories = [activeTab];
86+
const likeContestCategory = getLikeContestCategory(activeTab);
87+
if (likeContestCategory && mergeLikeContest) {
88+
selectedContestCategories.push(likeContestCategory);
89+
}
9190
const filteredContests =
9291
contests?.filter((c) =>
9392
selectedContestCategories.includes(classifyContest(c))

0 commit comments

Comments
 (0)