mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Fix title of manage hosts page UI for free version (#2467)
This commit is contained in:
parent
981028705e
commit
daa8a5d31a
2 changed files with 11 additions and 10 deletions
1
changes/fix-2458
Normal file
1
changes/fix-2458
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Fix missing default header on manage hosts page for Fleet Free version
|
||||
|
|
@ -224,14 +224,14 @@ const ManageHostsPage = ({
|
|||
}
|
||||
);
|
||||
|
||||
const { data: teams } = useQuery<ITeamsResponse, Error, ITeam[]>(
|
||||
["teams"],
|
||||
() => teamsAPI.loadAll(),
|
||||
{
|
||||
enabled: isPremiumTier,
|
||||
select: (data: ITeamsResponse) => data.teams,
|
||||
}
|
||||
);
|
||||
const { data: teams, isLoading: isLoadingTeams } = useQuery<
|
||||
ITeamsResponse,
|
||||
Error,
|
||||
ITeam[]
|
||||
>(["teams"], () => teamsAPI.loadAll(), {
|
||||
enabled: !!isPremiumTier,
|
||||
select: (data: ITeamsResponse) => data.teams,
|
||||
});
|
||||
|
||||
useQuery<IPolicyAPIResponse, Error>(
|
||||
["policy"],
|
||||
|
|
@ -757,7 +757,7 @@ const ManageHostsPage = ({
|
|||
};
|
||||
|
||||
const renderTeamsFilterDropdown = () => {
|
||||
if (!isPremiumTier || !teams) {
|
||||
if (isPremiumTier && isLoadingTeams) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -766,7 +766,7 @@ const ManageHostsPage = ({
|
|||
}
|
||||
|
||||
const teamOptions = generateTeamFilterDropdownOptions(
|
||||
teams,
|
||||
teams || [],
|
||||
currentUser,
|
||||
isOnGlobalTeam as boolean
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue