mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Fix host count on team details page (#4103)
This commit is contained in:
parent
778ee22147
commit
1f75429775
@ -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 New Issue
Block a user