Merge pull request 'Added S' (#2) from POULEREQUEST into main
Reviewed-on: #2
This commit is contained in:
commit
e56a016c02
2 changed files with 7 additions and 5 deletions
|
@ -50,7 +50,9 @@ export default function Leaderboard() {
|
|||
<main className="flex flex-col justify-between space-x-0 space-y-4 pb-4">
|
||||
{data && <Podium score={scores} />}
|
||||
<ul className="flex flex-col space-y-2">
|
||||
{data?.groups.map((group, key) => (
|
||||
{data?.groups.map((group, key) => {
|
||||
const tries = group.players.reduce((a, b) => a + b.tries, 0);
|
||||
return (
|
||||
<li key={key} className="flex justify-between space-x-2">
|
||||
<div className="flex items-center space-x-4">
|
||||
<span className={cn('font-semibold', SCORE_COLORS[group.rank - 1])}>
|
||||
|
@ -72,9 +74,9 @@ export default function Leaderboard() {
|
|||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<div className="flex flex-col">
|
||||
<span className="text-sm font-semibold">Essai(s)</span>
|
||||
<span className="text-sm font-semibold">Essai{tries > 1 ? "s":""}</span>
|
||||
<span className="text-lg text-muted">
|
||||
{group.players.reduce((a, b) => a + b.tries, 0)}
|
||||
{tries}
|
||||
</span>
|
||||
</div>
|
||||
{/* <div className="flex flex-col">
|
||||
|
@ -91,7 +93,7 @@ export default function Leaderboard() {
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
)) ||
|
||||
)}) ||
|
||||
[...Array(20).keys()].map((i) => (
|
||||
<span
|
||||
key={i}
|
||||
|
|
|
@ -137,7 +137,7 @@ export default function Puzzle({ token, id }: { token: string; id: number }) {
|
|||
<div className="flex items-center justify-between">
|
||||
<div className="items-center gap-x-2">
|
||||
<p>
|
||||
Tentative(s) : <span className="text-brand-accent">{puzzle.tries}</span>
|
||||
Tentative{puzzle.tries && puzzle.tries > 1 ? "s":""} : <span className="text-brand-accent">{puzzle.tries}</span>
|
||||
</p>
|
||||
<p>
|
||||
Score : <span className="text-brand-accent">{puzzle.score}</span>
|
||||
|
|
Loading…
Add table
Reference in a new issue