UI: Handle singular titles for all platforms (#12267)

## Addresses #12252, task 5
<img width="134" alt="Screenshot 2023-06-09 at 2 49 24 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/7937f233-3e94-4f58-9d79-22e7ee3a12ff">

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
Jacob Shandling 2023-06-09 15:21:15 -04:00 committed by GitHub
parent ab56431667
commit 9d576c8628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,7 @@ const HostsSummary = ({
count={macCount}
isLoading={isLoadingHostsSummary}
showUI={showHostsUI}
title="macOS hosts"
title={`macOS host${macCount === 1 ? "" : "s"}`}
path={PATHS.MANAGE_HOSTS_LABEL(7).concat(
teamId !== undefined ? `?team_id=${teamId}` : ""
)}
@ -67,7 +67,7 @@ const HostsSummary = ({
count={windowsCount}
isLoading={isLoadingHostsSummary}
showUI={showHostsUI}
title="Windows hosts"
title={`Windows host${windowsCount === 1 ? "" : "s"}`}
path={PATHS.MANAGE_HOSTS_LABEL(10).concat(
teamId !== undefined ? `?team_id=${teamId}` : ""
)}
@ -80,7 +80,7 @@ const HostsSummary = ({
count={linuxCount}
isLoading={isLoadingHostsSummary}
showUI={showHostsUI}
title="Linux hosts"
title={`Linux host${linuxCount === 1 ? "" : "s"}`}
path={PATHS.MANAGE_HOSTS_LABEL(12).concat(
teamId !== undefined ? `?team_id=${teamId}` : ""
)}
@ -91,13 +91,14 @@ const HostsSummary = ({
if (isLoadingChromeLabelId || chromeLabelId === undefined) {
return <></>;
}
return (
<SummaryTile
iconName="chrome-red"
count={chromeCount}
isLoading={isLoadingHostsSummary}
showUI={showHostsUI}
title="Chromebooks"
title={`Chromebook${chromeCount === 1 ? "" : "s"}`}
path={PATHS.MANAGE_HOSTS_LABEL(chromeLabelId).concat(
teamId !== undefined ? `?team_id=${teamId}` : ""
)}