File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,15 +36,14 @@ export class Leaderboard extends React.Component<
3636 isSearching : false ,
3737 nextFetchIndex : 1 ,
3838 offset : 0 ,
39- pageSize : Math . floor ( ( window . innerHeight * 0.7 ) / 100 ) ,
39+ pageSize : 10 ,
4040 pattern : '' ,
4141 } ;
4242 }
4343
4444 public componentWillMount ( ) : void {
4545 this . props . clearLeaderboard ( ) ;
46- const noOfElems = Math . floor ( ( window . innerHeight * 0.7 ) / 100 ) ;
47- this . props . getLeaderboard ( this . state . nextFetchIndex , noOfElems ) ;
46+ this . props . getLeaderboard ( this . state . nextFetchIndex , 10 ) ;
4847 this . props . getTimer ( ) ;
4948 }
5049
Original file line number Diff line number Diff line change @@ -49,10 +49,10 @@ export class RunOptions extends React.Component<
4949
5050 const maps = this . props . maps || hardCodedMap ;
5151
52- // const hardCodedAiIds: number[] = [1];
52+ const hardCodedAiIds : number [ ] = [ 1 ] ;
5353
54- // @ts -ignore
55- // const aiIds = hardCodedAiIds;
54+ @ts - ignore
55+ const aiIds = hardCodedAiIds ;
5656
5757 const matchOptions = [
5858 {
@@ -63,16 +63,16 @@ export class RunOptions extends React.Component<
6363 } ,
6464 ] ;
6565
66- // if (aiIds) {
67- // aiIds.map((aiId) => {
68- // matchOptions.push({
69- // aiId,
70- // icon: <FontAwesomeIcon icon={faRobot} />,
71- // name: `AI ${aiId} Match`,
72- // type: SubmissionActions.Type.AI_MATCH,
73- // });
74- // });
75- // }
66+ if ( aiIds ) {
67+ aiIds . map ( ( aiId ) => {
68+ matchOptions . push ( {
69+ aiId,
70+ icon : < FontAwesomeIcon icon = { faRobot } /> ,
71+ name : `AI ${ aiId } Match` ,
72+ type : SubmissionActions . Type . AI_MATCH ,
73+ } ) ;
74+ } ) ;
75+ }
7676
7777 const mapOptions = (
7878 < div className = { classnames ( styles [ 'dropdown-submenu' ] ) } >
You can’t perform that action at this time.
0 commit comments