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))
|
return numberFormat.format(Number(value || 0))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatMatchSize(playerCount) {
|
||||||
|
const count = formatNumber(playerCount)
|
||||||
|
return `${count}v${count}`
|
||||||
|
}
|
||||||
|
|
||||||
function formatDate(timestamp) {
|
function formatDate(timestamp) {
|
||||||
if (!timestamp) return 'Unknown time'
|
if (!timestamp) return 'Unknown time'
|
||||||
return dateFormat.format(new Date(Number(timestamp) * 1000))
|
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>
|
<p className="mt-4 text-sm text-danger">{gameState.error}</p>
|
||||||
) : null}
|
) : 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>
|
||||||
|
|
||||||
<div className="rounded-lg border border-border bg-fury-white shadow-sm">
|
<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">
|
<div className="overflow-hidden rounded-lg border border-border bg-fury-white shadow-sm">
|
||||||
{matches.map((match) => (
|
{matches.map((match) => (
|
||||||
<button
|
<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}
|
key={match.session_id}
|
||||||
onClick={() => navigate(gamePath(match.session_id))}
|
onClick={() => navigate(gamePath(match.session_id))}
|
||||||
type="button"
|
type="button"
|
||||||
@@ -2961,8 +2957,7 @@ function BattleLogsPage({ live, matches, navigate }) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<ParticipantNames participants={gameParticipants(match)} />
|
<ParticipantNames participants={gameParticipants(match)} />
|
||||||
<p className="text-sm">{formatNumber(match.player_count)} players</p>
|
<p className="text-sm">{formatMatchSize(match.player_count)}</p>
|
||||||
<p className="text-sm">{formatNumber(match.stats?.deaths)} deaths</p>
|
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user