ai generated solutions to our ai generated problems
This commit is contained in:
+34
-16
@@ -2786,10 +2786,9 @@ function GamePage({ gameId, navigate }) {
|
||||
) : null}
|
||||
|
||||
{game ? (
|
||||
<div className="mt-6 grid gap-5 sm:grid-cols-2 xl:grid-cols-4">
|
||||
<div className="mt-6 grid gap-5 sm:grid-cols-3">
|
||||
<Stat label="Players" value={formatNumber(game.player_count)} />
|
||||
<Stat label="Assists" value={formatNumber(game.stats?.assists)} />
|
||||
<Stat label="Score" value={formatNumber(game.stats?.score)} />
|
||||
<Stat label="Deaths" value={formatNumber(game.stats?.deaths)} />
|
||||
</div>
|
||||
) : null}
|
||||
@@ -2807,20 +2806,39 @@ function GamePage({ gameId, navigate }) {
|
||||
{participants.map((participant) => {
|
||||
const won = String(participant.result || '').toLowerCase() === 'win'
|
||||
return (
|
||||
<button
|
||||
className="grid w-full gap-4 border-b border-surface px-5 py-4 text-left transition hover:bg-surface md:grid-cols-[1fr_repeat(4,auto)] md:items-center"
|
||||
key={participant.team_name}
|
||||
onClick={() => navigate(teamPath(participant.team_name))}
|
||||
type="button"
|
||||
>
|
||||
<p className={`truncate font-semibold ${won ? 'text-fury-violet' : 'text-text-soft'}`}>
|
||||
{participant.team_name}
|
||||
</p>
|
||||
<p className="text-sm">{formatNumber(participant.player_count)} players</p>
|
||||
<p className="text-sm">{formatNumber(participant.stats?.assists)} assists</p>
|
||||
<p className="text-sm">{formatNumber(participant.stats?.score)} score</p>
|
||||
<p className="text-sm">{formatNumber(participant.stats?.deaths)} deaths</p>
|
||||
</button>
|
||||
<div className="border-b border-surface" key={participant.team_name}>
|
||||
<button
|
||||
className="grid w-full gap-4 px-5 py-4 text-left transition hover:bg-surface md:grid-cols-[1fr_repeat(3,auto)] md:items-center"
|
||||
onClick={() => navigate(teamPath(participant.team_name))}
|
||||
type="button"
|
||||
>
|
||||
<p className={`truncate font-semibold ${won ? 'text-fury-violet' : 'text-text-soft'}`}>
|
||||
{participant.team_name}
|
||||
</p>
|
||||
<p className="text-sm">{formatNumber(participant.player_count)} players</p>
|
||||
<p className="text-sm">{formatNumber(participant.stats?.assists)} assists</p>
|
||||
<p className="text-sm">{formatNumber(participant.stats?.deaths)} deaths</p>
|
||||
</button>
|
||||
|
||||
<div className="pb-3">
|
||||
{(participant.players || []).map((player) => (
|
||||
<button
|
||||
className="grid w-full gap-3 px-5 py-2 pl-10 text-left text-sm transition hover:bg-surface md:grid-cols-[1fr_repeat(3,auto)] md:items-center sm:pl-14"
|
||||
key={player.uid}
|
||||
onClick={() => navigate(`/players/${encodeURIComponent(player.uid)}`)}
|
||||
type="button"
|
||||
>
|
||||
<div className="min-w-0">
|
||||
<p className="truncate font-semibold text-text">{player.nick || player.uid}</p>
|
||||
<p className="text-xs text-text-soft">{player.uid}</p>
|
||||
</div>
|
||||
<p>{formatNumber(player.stats?.assists)} assists</p>
|
||||
<p>{formatNumber(player.stats?.score)} score</p>
|
||||
<p>{formatNumber(player.stats?.deaths)} deaths</p>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user