diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs index d38f3c0..ad19f4e 100644 --- a/ecosystem.config.cjs +++ b/ecosystem.config.cjs @@ -6,7 +6,7 @@ module.exports = { cwd: __dirname, env: { NODE_ENV: 'production', - PORT: process.env.PORT || 3001, + PORT: process.env.PORT || 3010, API_UPSTREAM: process.env.API_UPSTREAM || 'http://127.0.0.1:6000', }, }, diff --git a/example.env b/example.env index 8849735..ab79ded 100644 --- a/example.env +++ b/example.env @@ -1,6 +1,6 @@ NODE_ENV=production -PORT=3001 +PORT=3010 API_UPSTREAM=http://127.0.0.1:6000 WEBHOOK_PORT=3011 diff --git a/src/App.jsx b/src/App.jsx index 91406f9..0bbc0cd 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -125,6 +125,11 @@ function App() { history: { status: 'idle', data: null, error: null }, games: { status: 'idle', data: null, error: null }, }) + const teams = useMemo( + () => leaderboard.data?.teams || leaderboard.data?.squadrons || [], + [leaderboard.data], + ) + const matches = live.data?.matches || [] function navigate(path) { window.history.pushState({}, '', path) @@ -342,11 +347,6 @@ function App() { } }, [route.page, route.teamName]) - const teams = useMemo( - () => leaderboard.data?.teams || leaderboard.data?.squadrons || [], - [leaderboard.data], - ) - const matches = live.data?.matches || [] const topTeamName = bestTeamName(teams[0]) const searchPlaceholder = searchHint.status === 'ready' ? `Found ${searchHint.name}` : topTeamName || 'Search teams' @@ -523,22 +523,26 @@ function RecentGamesSection({ live, matches, navigate }) {
{formatDate(match.endtime_unix)}
+{formatDate(match.timestamp)}
- {match.game_type || match.mode || 'SQB'} + {match.result || 'Unknown'} -- {match.winning_tag || match.winning_squadron || 'Winner'} +
+ {match.team_name || 'TSS team'}
- vs -- {match.losing_tag || match.losing_squadron || 'Loser'} +
+ {formatNumber(match.player_count)} players
{match.map_name || 'Unknown map'}
-{formatDate(match.endtime_unix)}
-- {match.winning_tag || match.winning_squadron || 'Winner'} -
- vs -- {match.losing_tag || match.losing_squadron || 'Loser'} +
+ {formatDate(match.timestamp)} ยท {match.session_id}
{match.game_type || match.mode || 'SQB'}
++ {match.team_name || 'TSS team'} +
+{match.long_name || 'TSS battle record'}
++ {match.result || 'Unknown'} +
+{formatNumber(match.player_count)} players
+{formatNumber(match.stats?.ground_kills)} ground
+{formatNumber(match.stats?.air_kills)} air
+{formatNumber(match.stats?.deaths)} deaths