feat: Show a crown next to the first place

This commit is contained in:
Alexander Polynomdivision committed 2018-09-24 13:53:33 +02:00
1 parent 28160e329b
commit f73a09849e
1 file changed
+7 -1
+7 -1
View File
@@ -28,6 +28,12 @@ export default class Scoreboard extends React.Component<IProps> {
}
tableRow(learner: TopTen) {
// Gotta show respect! (That Unicode monster is a crown)
const username = {
false: learner.username,
true: `${learner.username} 👑`
}[learner.nr === 1];
return <TableRow key={this.genId()}>
<TableCell>
<Typography variant="title" component="b">
@@ -35,7 +41,7 @@ export default class Scoreboard extends React.Component<IProps> {
</Typography>
</TableCell>
<TableCell>
<Typography component="b">{learner.username}</Typography>
<Typography component="b">{username}</Typography>
</TableCell>
{/*<TableCell numeric>{learner.level}</TableCell>*/}
{/* To make this fit on both mobile and desktop, we don't use