feat: Show a crown next to the first place
This commit is contained in:
parent
28160e329b
commit
f73a09849e
@ -28,6 +28,12 @@ export default class Scoreboard extends React.Component<IProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tableRow(learner: TopTen) {
|
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()}>
|
return <TableRow key={this.genId()}>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<Typography variant="title" component="b">
|
<Typography variant="title" component="b">
|
||||||
@ -35,7 +41,7 @@ export default class Scoreboard extends React.Component<IProps> {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<Typography component="b">{learner.username}</Typography>
|
<Typography component="b">{username}</Typography>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{/*<TableCell numeric>{learner.level}</TableCell>*/}
|
{/*<TableCell numeric>{learner.level}</TableCell>*/}
|
||||||
{/* To make this fit on both mobile and desktop, we don't use
|
{/* To make this fit on both mobile and desktop, we don't use
|
||||||
|
Reference in New Issue
Block a user