File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class MatchmakingPoolTransformer extends TransformerAbstract
1414 public function transform (MatchmakingPool $ pool ): array
1515 {
1616 return [
17+ 'active ' => $ pool ->active ,
1718 'id ' => $ pool ->getKey (),
1819 'name ' => $ pool ->name ,
1920 'ruleset_id ' => $ pool ->ruleset_id ,
Original file line number Diff line number Diff line change 44import { RulesetId , RulesetVariantId } from './ruleset' ;
55
66export default interface MatchmakingPoolJson {
7+ active : boolean ;
78 id : number ;
89 name : string ;
910 ruleset_id : RulesetId ;
Original file line number Diff line number Diff line change @@ -14,10 +14,14 @@ interface Props {
1414@observer
1515export default class Matchmaking extends React . Component < Props > {
1616 render ( ) {
17+ if ( this . props . allStats . length === 0 ) {
18+ return null ;
19+ }
1720 let highestRank : null | number = null ;
1821 for ( const stats of this . props . allStats ) {
1922 const rank = stats . rank ;
20- if ( rank != null ) {
23+ // only show active stats for profile page
24+ if ( stats . pool . active && rank != null ) {
2125 if ( highestRank == null ) {
2226 highestRank = rank ;
2327 } else if ( rank < highestRank ) {
You can’t perform that action at this time.
0 commit comments