ai generated solutions to our ai generated problems
This commit is contained in:
+7
-12
@@ -104,6 +104,11 @@ function formatNumber(value) {
|
||||
return numberFormat.format(Number(value || 0))
|
||||
}
|
||||
|
||||
function formatMatchSize(playerCount) {
|
||||
const count = formatNumber(playerCount)
|
||||
return `${count}v${count}`
|
||||
}
|
||||
|
||||
function formatDate(timestamp) {
|
||||
if (!timestamp) return 'Unknown time'
|
||||
return dateFormat.format(new Date(Number(timestamp) * 1000))
|
||||
@@ -2785,15 +2790,6 @@ function GamePage({ gameId, navigate }) {
|
||||
<p className="mt-4 text-sm text-danger">{gameState.error}</p>
|
||||
) : null}
|
||||
|
||||
{game ? (
|
||||
<div className="mt-6 grid gap-5 sm:grid-cols-2 xl:grid-cols-5">
|
||||
<Stat label="Players" value={formatNumber(game.player_count)} />
|
||||
<Stat label="Ground" value={formatNumber(game.stats?.ground_kills)} />
|
||||
<Stat label="Air" value={formatNumber(game.stats?.air_kills)} />
|
||||
<Stat label="Assists" value={formatNumber(game.stats?.assists)} />
|
||||
<Stat label="Deaths" value={formatNumber(game.stats?.deaths)} />
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
<div className="rounded-lg border border-border bg-fury-white shadow-sm">
|
||||
@@ -2949,7 +2945,7 @@ function BattleLogsPage({ live, matches, navigate }) {
|
||||
<div className="overflow-hidden rounded-lg border border-border bg-fury-white shadow-sm">
|
||||
{matches.map((match) => (
|
||||
<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_minmax(10rem,0.8fr)_repeat(2,auto)] md:items-center"
|
||||
className="grid w-full gap-4 border-b border-surface px-5 py-4 text-left transition hover:bg-surface md:grid-cols-[1fr_minmax(10rem,0.8fr)_auto] md:items-center"
|
||||
key={match.session_id}
|
||||
onClick={() => navigate(gamePath(match.session_id))}
|
||||
type="button"
|
||||
@@ -2961,8 +2957,7 @@ function BattleLogsPage({ live, matches, navigate }) {
|
||||
</p>
|
||||
</div>
|
||||
<ParticipantNames participants={gameParticipants(match)} />
|
||||
<p className="text-sm">{formatNumber(match.player_count)} players</p>
|
||||
<p className="text-sm">{formatNumber(match.stats?.deaths)} deaths</p>
|
||||
<p className="text-sm">{formatMatchSize(match.player_count)}</p>
|
||||
</button>
|
||||
))}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user