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
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 13s
This commit is contained in:
@@ -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
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user