From 9d576c862899ebb57ec85085e1c68cfbbfe9e282 Mon Sep 17 00:00:00 2001 From: Jacob Shandling <61553566+jacobshandling@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:21:15 -0400 Subject: [PATCH] UI: Handle singular titles for all platforms (#12267) ## Addresses #12252, task 5 Screenshot 2023-06-09 at 2 49 24 PM --------- Co-authored-by: Jacob Shandling --- .../DashboardPage/cards/HostsSummary/HostsSummary.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/pages/DashboardPage/cards/HostsSummary/HostsSummary.tsx b/frontend/pages/DashboardPage/cards/HostsSummary/HostsSummary.tsx index 27a0866176..463f0c0e26 100644 --- a/frontend/pages/DashboardPage/cards/HostsSummary/HostsSummary.tsx +++ b/frontend/pages/DashboardPage/cards/HostsSummary/HostsSummary.tsx @@ -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 (