From fb12ed10ca0403a375b78fcfaf241d0f2657acf3 Mon Sep 17 00:00:00 2001 From: noahtalerman <47070608+noahtalerman@users.noreply.github.com> Date: Tue, 15 Jun 2021 13:04:32 -0400 Subject: [PATCH] Add hosts count to Team details page (#1090) - Display number of hosts assigned to a team on the Team details page - Add back button styles to "Back to teams" link --- .../TeamDetailsWrapper/TeamDetailsWrapper.tsx | 12 +++++++++--- .../TeamDetailsWrapper/_styles.scss | 10 +++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx b/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx index b0160a93c..5751f54ea 100644 --- a/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx +++ b/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx @@ -17,6 +17,7 @@ import EditTeamModal from "../components/EditTeamModal"; import { IEditTeamFormData } from "../components/EditTeamModal/EditTeamModal"; import AddHostsRedirectModal from "./components/AddHostsModal/AddHostsRedirectModal"; +import BackChevron from "../../../../../assets/images/icon-chevron-down-9x6@2x.png"; import PencilIcon from "../../../../../assets/images/icon-pencil-14x14@2x.png"; import TrashIcon from "../../../../../assets/images/icon-trash-14x14@2x.png"; @@ -159,17 +160,22 @@ const TeamDetailsWrapper = (props: ITeamDetailsPageProps): JSX.Element => { ); } + const hostsCount = team.host_count; + const hostsTotalDisplay = hostsCount === 1 ? "1 host" : `${hostsCount} hosts`; return (