From 7a7ba0e02b359cecbe76a0d68af188b8af8c270f Mon Sep 17 00:00:00 2001 From: Mohamed Khelif Date: Tue, 27 Feb 2024 16:44:27 -0500 Subject: [PATCH] Fix unnecessary nesting --- src/pages/taskQueue/index.tsx | 66 ++++++++++++++++------------------- 1 file changed, 30 insertions(+), 36 deletions(-) diff --git a/src/pages/taskQueue/index.tsx b/src/pages/taskQueue/index.tsx index 4984f0f82d..3ae984db08 100644 --- a/src/pages/taskQueue/index.tsx +++ b/src/pages/taskQueue/index.tsx @@ -6,11 +6,7 @@ import { H2, H2Props, H3, H3Props } from "@leafygreen-ui/typography"; import { useParams, useNavigate } from "react-router-dom"; import { useTaskQueueAnalytics } from "analytics"; import SearchableDropdown from "components/SearchableDropdown"; -import { - TableControlOuterRow, - PageWrapper, - StyledRouterLink, -} from "components/styles"; +import { PageWrapper, StyledRouterLink } from "components/styles"; import { getTaskQueueRoute, getAllHostsRoute } from "constants/routes"; import { size } from "constants/tokens"; import { useToastContext } from "context/toast"; @@ -85,37 +81,35 @@ const TaskQueue = () => { return ( Task Queue - - - ( - - )} - onChange={onChangeDistroSelection} - value={selectedDistro} - buttonRenderer={(option: TaskQueueDistro) => ( - - {`${option?.taskCount || 0} ${ - option?.taskCount === 1 ? "TASK" : "TASKS" - }`} - {`${option?.hostCount || 0} ${ - option?.hostCount === 1 ? "HOST" : "HOSTS" - }`} - {option?.id} - - )} - /> - - + + ( + + )} + onChange={onChangeDistroSelection} + value={selectedDistro} + buttonRenderer={(option: TaskQueueDistro) => ( + + {`${option?.taskCount || 0} ${ + option?.taskCount === 1 ? "TASK" : "TASKS" + }`} + {`${option?.hostCount || 0} ${ + option?.hostCount === 1 ? "HOST" : "HOSTS" + }`} + {option?.id} + + )} + /> + { /* Only show name & link if distro exists. */ distro && (