Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit da31bfe

Browse files
committed
Resolve #166
1 parent 397bed0 commit da31bfe

File tree

2 files changed

+10
-34
lines changed

2 files changed

+10
-34
lines changed

‎src/pages/TablePage/TableTab.tsx

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import { Row, ButtonGroup, Button } from 'reactstrap';
33

44
export enum ContestTableTab {
55
'regular' = 0,
6-
'long' = 1,
7-
'other' = 2,
8-
'other_problems' = 3,
9-
'all' = 4,
6+
'other' = 1,
7+
'other_problems' = 2,
8+
'all' = 3,
109
}
1110

1211
interface Props {
@@ -26,16 +25,7 @@ export const TableTabButtons: React.FC<Props> = (props) => {
2625
}}
2726
active={active === ContestTableTab.regular}
2827
>
29-
yukicoder contest (regular)
30-
</Button>
31-
<Button
32-
color="secondary"
33-
onClick={() => {
34-
setActive(ContestTableTab.long);
35-
}}
36-
active={active === ContestTableTab.long}
37-
>
38-
yukicoder contest (long)
28+
yukicoder contest
3929
</Button>
4030
<Button
4131
color="secondary"

‎src/pages/TablePage/index.tsx

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -184,17 +184,15 @@ export const TablePage: React.FC = () => {
184184
ContestTableTab.regular
185185
);
186186

187-
const yukicoderRegularContests = [] as Contest[];
188-
const yukicoderLongContests = [] as Contest[];
187+
const yukicoderContests = [] as Contest[];
189188
const otherContests = [] as Contest[];
190189
const otherProblems = [] as Contest[];
191-
const regexpYukicoderContest = /^yukicodercontest\d+/;
190+
const regexpYukicoderContest = /^\s*yukicoder\s+contest\s+\d+/;
192191
const regexpOpenContest = /\(Open\)$/;
193192
contests.forEach((contest) => {
194193
if (regexpYukicoderContest.exec(contest.Name)) {
195-
if (contest.ProblemIdList.length <= 7)
196-
yukicoderRegularContests.push(contest);
197-
else yukicoderLongContests.push(contest);
194+
if (contest.ProblemIdList.length <= 8) yukicoderContests.push(contest);
195+
else otherContests.push(contest);
198196
} else if (regexpOpenContest.exec(contest.Name)) {
199197
otherProblems.push(contest);
200198
} else otherContests.push(contest);
@@ -286,20 +284,8 @@ export const TablePage: React.FC = () => {
286284
<DifficultyStarsFillDefs />
287285
<ContestWrapper display={activeTab === ContestTableTab.regular}>
288286
<YukicoderRegularTable
289-
contests={yukicoderRegularContests}
290-
title="yukicoder contest (regular)"
291-
mergedProblemsMap={mergedProblemsMap}
292-
showDifficultyLevel={showDifficultyLevel}
293-
problemLinkColorMode={colorMode}
294-
showContestResult={showContestResult}
295-
showContestDate={showContestDate}
296-
universalStateLoaded={universalStateLoaded}
297-
/>
298-
</ContestWrapper>
299-
<ContestWrapper display={activeTab === ContestTableTab.long}>
300-
<ContestTable
301-
contests={yukicoderLongContests}
302-
title="yukicoder contest (long)"
287+
contests={yukicoderContests}
288+
title="yukicoder contest"
303289
mergedProblemsMap={mergedProblemsMap}
304290
showDifficultyLevel={showDifficultyLevel}
305291
problemLinkColorMode={colorMode}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /