Skip to content

Commit e099bb6

Browse files
committed
add no data msg for leaderboards
1 parent a0dda75 commit e099bb6

File tree

1 file changed

+3
-1
lines changed
  • src/shared/components/Leaderboard/LeaderboardTable

1 file changed

+3
-1
lines changed

src/shared/components/Leaderboard/LeaderboardTable/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export default function LeaderboardTable(props) {
201201
})
202202
);
203203

204-
return (
204+
return competitors.length ? (
205205
<table styleName={`${stylesName}.LeaderboardTable`}>
206206
<thead>
207207
<tr styleName={`${stylesName}.table-header`}>
@@ -241,6 +241,8 @@ export default function LeaderboardTable(props) {
241241
{renderTableRows(competitors)}
242242
</tbody>
243243
</table>
244+
) : (
245+
<h2 style={{ textAlign: 'center' }}>No Data Available</h2>
244246
);
245247
}
246248

0 commit comments

Comments
 (0)