File tree Expand file tree Collapse file tree 6 files changed +28
-6
lines changed
Leaderboard/ChallengeHistoryModal
ProfilePage/StatsCategory
containers/tco/Leaderboard Expand file tree Collapse file tree 6 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ ContentSlider.defaultProps = {
101
101
cellSpacing : null ,
102
102
cellAlign : 'center' ,
103
103
wrapAround : true ,
104
- heightMode : 'current ' ,
104
+ heightMode : 'max ' ,
105
105
arrowTheme : 'Gray' ,
106
106
} ;
107
107
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class ChallengeHistoryModal extends Component {
28
28
loading,
29
29
isCopilot,
30
30
isAlgo,
31
+ themeName,
31
32
} = this . props ;
32
33
const { sortParam } = this . state ;
33
34
const challengesOrdered = _ . orderBy ( challenges , [ sortParam . field ] , [ sortParam . order ] ) ;
@@ -44,7 +45,7 @@ class ChallengeHistoryModal extends Component {
44
45
competitor = { competitor }
45
46
isCopilot = { isCopilot }
46
47
isAlgo = { isAlgo }
47
- themeName = "TCO22"
48
+ themeName = { themeName }
48
49
/>
49
50
</ div >
50
51
< table styleName = "history-table" >
@@ -178,6 +179,7 @@ ChallengeHistoryModal.propTypes = {
178
179
loading : PT . bool . isRequired ,
179
180
isAlgo : PT . bool ,
180
181
isCopilot : PT . bool ,
182
+ themeName : PT . string . isRequired ,
181
183
} ;
182
184
183
185
export default ChallengeHistoryModal ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ $light-gray: #d4d4d4;
12
12
width : 70% ;
13
13
max-height : 90% ;
14
14
overflow-y : auto ;
15
- padding : 80 px 78px ;
15
+ padding : 60 px 78px 80 px ;
16
16
17
17
@media (max-width : 768px ) {
18
18
width : 90% ;
@@ -26,7 +26,7 @@ $light-gray: #d4d4d4;
26
26
font-weight : 500 ;
27
27
line-height : 38px ;
28
28
text-align : center ;
29
- margin-bottom : 60 px ;
29
+ margin-bottom : 40 px ;
30
30
text-transform : uppercase ;
31
31
32
32
@media (max-width : 768px ) {
Original file line number Diff line number Diff line change @@ -35,12 +35,27 @@ const isActiveSubtrack = (subtrack) => {
35
35
}
36
36
if ( subtrack . rank && subtrack . rank . rating > 0 ) {
37
37
return true ;
38
- } if ( _ . isNumber ( subtrack . submissions ) ) {
38
+ }
39
+ if ( _ . isNumber ( subtrack . submissions ) ) {
39
40
return subtrack . submissions > 0 ;
40
41
}
41
42
return subtrack . submissions && subtrack . submissions . submissions > 0 ;
42
43
} ;
43
44
45
+ /**
46
+ * Inspects a subtrack and determines if it should be hidden
47
+ *
48
+ * @param {Object } subtrack Subtrack object
49
+ * @returns {Boolean }
50
+ */
51
+ const isHidden = ( subtrack ) => {
52
+ if ( subtrack . name === 'DEVELOP_MARATHON_MATCH' ) {
53
+ return true ;
54
+ }
55
+
56
+ return false ;
57
+ } ;
58
+
44
59
class StatsCategory extends React . Component {
45
60
getActiveTracks ( ) {
46
61
let { stats } = this . props ;
@@ -72,7 +87,7 @@ class StatsCategory extends React.Component {
72
87
}
73
88
74
89
subTracks . forEach ( ( subtrack ) => {
75
- if ( isActiveSubtrack ( subtrack ) ) {
90
+ if ( isActiveSubtrack ( subtrack ) && ! isHidden ( subtrack ) ) {
76
91
active . push ( { ...subtrack , active : true } ) ;
77
92
}
78
93
} ) ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ function ChallengeHistoryModalContainer({
13
13
loading,
14
14
isCopilot,
15
15
isAlgo,
16
+ themeName,
16
17
} ) {
17
18
useEffect ( ( ) => {
18
19
getChallengesHistory ( dataUrl , competitor ) ;
@@ -26,6 +27,7 @@ function ChallengeHistoryModalContainer({
26
27
loading = { loading }
27
28
isCopilot = { isCopilot }
28
29
isAlgo = { isAlgo }
30
+ themeName = { themeName }
29
31
/>
30
32
) ;
31
33
}
@@ -36,6 +38,7 @@ ChallengeHistoryModalContainer.defaultProps = {
36
38
loading : false ,
37
39
isCopilot : false ,
38
40
isAlgo : false ,
41
+ themeName : 'Default' ,
39
42
} ;
40
43
41
44
const CHALLENGES_TYPE = PT . arrayOf ( PT . shape ( {
@@ -61,6 +64,7 @@ ChallengeHistoryModalContainer.propTypes = {
61
64
loading : PT . bool ,
62
65
isAlgo : PT . bool ,
63
66
isCopilot : PT . bool ,
67
+ themeName : PT . string ,
64
68
} ;
65
69
66
70
function mapStateToProps ( state , ownProps ) {
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ class LeaderboardPageContainer extends React.Component {
97
97
dataUrl = { tcoPointsApiUrl }
98
98
isCopilot = { isCopilot }
99
99
isAlgo = { isAlgo }
100
+ themeName = { themeName }
100
101
/>
101
102
) : null
102
103
}
You can’t perform that action at this time.
0 commit comments