Skip to content

Commit b28c403

Browse files
authored
Merge pull request #5098 from topcoder-platform/looker-api-update
Fixes for headers
2 parents 3a3feee + 1030f86 commit b28c403

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/shared/components/MMatchLeaderboard/index.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ export default class MMLeaderboard extends Component {
6868

6969
if (sortParam.field) {
7070
// 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+
);
7275
}
7376

7477
const renderData = () => {
@@ -217,7 +220,7 @@ export default class MMLeaderboard extends Component {
217220
};
218221
return (
219222
<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> }
221224
</React.Fragment>
222225
);
223226
}

src/shared/components/MMatchLeaderboard/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$light-gray: #d4d4d4;
44

5-
h4 {
5+
.no-data-title {
66
text-align: center;
77
}
88

0 commit comments

Comments
 (0)