@@ -49,7 +49,7 @@ export default class ContestApp extends React.Component<ContestAppProps, Contest
49
49
50
50
this . state = {
51
51
initialized : false ,
52
- submitResults : [ ] as [ number ] ,
52
+ submitResults : ( [ ] as unknown ) as [ number ] ,
53
53
} ;
54
54
}
55
55
@@ -59,7 +59,7 @@ export default class ContestApp extends React.Component<ContestAppProps, Contest
59
59
60
60
public componentWillUnmount ( ) : void {
61
61
if ( this . rankingRequestTimerId !== 0 ) {
62
- clearInterval ( this . rankingRequestTimerId ) ;
62
+ window . clearInterval ( this . rankingRequestTimerId ) ;
63
63
}
64
64
}
65
65
@@ -287,7 +287,7 @@ export default class ContestApp extends React.Component<ContestAppProps, Contest
287
287
label : dataSet . label ,
288
288
correct : dataSet . correct ,
289
289
score : dataSet . score ,
290
- solvedAt : dataSet . solved_at ? new Date ( dataSet . solved_at ) : null ,
290
+ solvedAt : dataSet . solved_at ? new Date ( dataSet . solved_at ) : undefined ,
291
291
wrongAnswers : dataSet . wrong_answers ,
292
292
} ) ) ,
293
293
} ) ) ,
@@ -304,7 +304,7 @@ export default class ContestApp extends React.Component<ContestAppProps, Contest
304
304
this . setState ( { users } ) ;
305
305
306
306
if ( ! this . rankingRequestTimerId ) {
307
- this . rankingRequestTimerId = setInterval ( this . fetchRanking . bind ( this ) , 60 * 1000 ) ;
307
+ this . rankingRequestTimerId = window . setInterval ( this . fetchRanking . bind ( this ) , 60 * 1000 ) ;
308
308
}
309
309
}
310
310
@@ -321,7 +321,7 @@ export default class ContestApp extends React.Component<ContestAppProps, Contest
321
321
322
322
if ( now < time . startAt ) {
323
323
setTimeout ( ( ) => {
324
- alert ( " コンテストを開始します" ) ;
324
+ alert ( ' コンテストを開始します' ) ;
325
325
location . reload ( ) ;
326
326
} , time . startAt . getTime ( ) - now . getTime ( ) ) ;
327
327
}
@@ -398,12 +398,13 @@ export default class ContestApp extends React.Component<ContestAppProps, Contest
398
398
exact = { true }
399
399
path = "/contests/:contestId"
400
400
render = { ( ) : JSX . Element => < ContestHome contest = { this . state . contest } join = { this . join . bind ( this ) } /> }
401
- /> ;
401
+ />
402
+ ;
402
403
< Route
403
404
exact = { true }
404
405
path = "/contests/:contestId/problems/:problemId"
405
406
render = { ( props : any ) : JSX . Element => {
406
- return ! this . state . contest . problems ? null : (
407
+ return ! this . state . contest . problems ? undefined : (
407
408
< Problem
408
409
contest = { this . state . contest }
409
410
problem = { this . state . contest . problems . find (
@@ -419,7 +420,7 @@ export default class ContestApp extends React.Component<ContestAppProps, Contest
419
420
exact = { true }
420
421
path = "/contests/:contestId/ranking"
421
422
render = { ( ) : JSX . Element => {
422
- return ! this . state . users ? null : < Ranking contest = { this . state . contest } users = { this . state . users } /> ;
423
+ return ! this . state . users ? undefined : < Ranking contest = { this . state . contest } users = { this . state . users } /> ;
423
424
} }
424
425
/>
425
426
< Route
0 commit comments