Remove maxPlayers from server data handling for simplified player count display
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 13s

This commit is contained in:
2025-10-06 19:27:05 +08:00
parent 3c9fe445c9
commit 4a0f9c1a67
2 changed files with 1 additions and 4 deletions

View File

@@ -10,7 +10,6 @@ interface ServerListResponse {
mapName: string mapName: string
humanCount: number humanCount: number
botCount: number botCount: number
maxPlayers?: number
} }
export interface ServerData { export interface ServerData {
@@ -21,7 +20,6 @@ export interface ServerData {
mapName: string mapName: string
playerCount: number // Human players only (excluding bots) playerCount: number // Human players only (excluding bots)
botCount: number botCount: number
maxPlayers: number
status: 'online' | 'offline' | 'loading' status: 'online' | 'offline' | 'loading'
error?: string error?: string
} }
@@ -64,7 +62,6 @@ export function ServerProvider({ children }: { children: ReactNode }) {
mapName: server.mapName, mapName: server.mapName,
playerCount: server.humanCount, playerCount: server.humanCount,
botCount: server.botCount, botCount: server.botCount,
maxPlayers: server.maxPlayers || 0,
status: 'online' as const status: 'online' as const
})) }))

View File

@@ -264,7 +264,7 @@ function Servers() {
fontWeight: 'bold', fontWeight: 'bold',
color: 'var(--text-primary)' color: 'var(--text-primary)'
}}> }}>
{server.status === 'online' ? `${server.playerCount}/${server.maxPlayers}` : 'Loading...'} {server.status === 'online' ? server.playerCount : 'Loading...'}
</div> </div>
</div> </div>
<div> <div>