Refactor server statistics to replace totalSlots with totalBots for accurate player count display
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 11s
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 11s
This commit is contained in:
@@ -43,7 +43,7 @@ function App() {
|
|||||||
// Calculate server statistics
|
// Calculate server statistics
|
||||||
const onlineServers = servers.filter(s => s.status === 'online')
|
const onlineServers = servers.filter(s => s.status === 'online')
|
||||||
const totalPlayers = onlineServers.reduce((sum, s) => sum + s.playerCount, 0)
|
const totalPlayers = onlineServers.reduce((sum, s) => sum + s.playerCount, 0)
|
||||||
const totalSlots = onlineServers.reduce((sum, s) => sum + s.maxPlayers, 0)
|
const totalBots = onlineServers.reduce((sum, s) => sum + s.botCount, 0)
|
||||||
|
|
||||||
// Get most popular server (highest player count)
|
// Get most popular server (highest player count)
|
||||||
const mostPopularServer = onlineServers.length > 0
|
const mostPopularServer = onlineServers.length > 0
|
||||||
@@ -260,7 +260,7 @@ function App() {
|
|||||||
color: 'var(--accent-primary)',
|
color: 'var(--accent-primary)',
|
||||||
fontWeight: 'bold'
|
fontWeight: 'bold'
|
||||||
}}>
|
}}>
|
||||||
{totalPlayers}/{totalSlots}
|
{totalPlayers}{totalBots > 0 ? ` (+${totalBots})` : ''}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div style={{
|
<div style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user