File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
src/shared/components/MMatchLeaderboard Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,10 @@ export default class MMLeaderboard extends Component {
68
68
69
69
if ( sortParam . field ) {
70
70
// Use Lodash to sort array
71
- data = _ . orderBy ( data , [ d => ( typeof d [ sortParam . field ] === 'string' ? d [ sortParam . field ] . toLowerCase ( ) : d [ sortParam . field ] ) ] , [ sortParam . order ] ) ;
71
+ data = _ . orderBy (
72
+ data ,
73
+ [ d => String ( d [ sortParam . field ] ) . toLowerCase ( ) ] , [ sortParam . order ] ,
74
+ ) ;
72
75
}
73
76
74
77
const renderData = ( ) => {
@@ -217,7 +220,7 @@ export default class MMLeaderboard extends Component {
217
220
} ;
218
221
return (
219
222
< React . Fragment >
220
- { data . length ? renderData ( ) : < h4 > No data available yet.</ h4 > }
223
+ { data . length ? renderData ( ) : < h4 styleName = "no-data-title" > No data available yet.</ h4 > }
221
224
</ React . Fragment >
222
225
) ;
223
226
}
Original file line number Diff line number Diff line change 2
2
3
3
$light-gray : #d4d4d4 ;
4
4
5
- h4 {
5
+ .no-data-title {
6
6
text-align : center ;
7
7
}
8
8
You can’t perform that action at this time.
0 commit comments