mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
Fix host count on team details page (#4103)
This commit is contained in:
parent
778ee22147
commit
1f75429775
2 changed files with 4 additions and 2 deletions
|
|
@ -20,6 +20,7 @@ export interface ITeamSummary {
|
|||
id: number;
|
||||
name: string;
|
||||
description?: string;
|
||||
host_count: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -350,8 +350,9 @@ const TeamDetailsWrapper = ({
|
|||
);
|
||||
}
|
||||
|
||||
const hostsCount = teams?.length || 1;
|
||||
const hostsTotalDisplay = hostsCount === 1 ? "1 host" : `${hostsCount} hosts`;
|
||||
const hostCount = currentTeam.host_count;
|
||||
const hostsTotalDisplay =
|
||||
hostCount >= 2 ? `${hostCount} hosts` : `${hostCount} host`;
|
||||
const userAdminTeams = userTeams.filter(
|
||||
(thisTeam) => thisTeam.role === "admin"
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue