Refactor player count calculations to exclude bot counts for accurate statistics
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:
@@ -264,7 +264,7 @@ function Servers() {
|
||||
fontWeight: 'bold',
|
||||
color: 'var(--text-primary)'
|
||||
}}>
|
||||
{server.status === 'online' ? `${server.playerCount - server.botCount}/${server.maxPlayers}` : 'Loading...'}
|
||||
{server.status === 'online' ? `${server.playerCount}/${server.maxPlayers}` : 'Loading...'}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -380,7 +380,7 @@ function Servers() {
|
||||
color: 'var(--accent-primary)',
|
||||
marginBottom: '0.5rem'
|
||||
}}>
|
||||
{servers.reduce((sum, s) => sum + (s.status === 'online' ? (s.playerCount - s.botCount) : 0), 0)}
|
||||
{servers.reduce((sum, s) => sum + (s.status === 'online' ? s.playerCount : 0), 0)}
|
||||
</div>
|
||||
<div style={{
|
||||
color: 'var(--text-secondary)',
|
||||
|
||||
Reference in New Issue
Block a user