diff --git a/site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx b/site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx index 6b156c8fca38e..80fe42244f828 100644 --- a/site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx @@ -18,7 +18,6 @@ import { import type { Template, Workspace } from "api/typesGenerated"; import { TopbarData, TopbarIcon } from "components/FullPageLayout/Topbar"; import { displayError, displaySuccess } from "components/GlobalSnackbar/utils"; -import { Pill } from "components/Pill/Pill"; import { useTime } from "hooks/useTime"; import { getWorkspaceActivityStatus } from "modules/workspaces/activity"; import { @@ -170,11 +169,9 @@ const AutostopDisplay: FC = ({ const [showControlsAnyway, setShowControlsAnyway] = useState(false); let onClickScheduleIcon: (() => void) | undefined; - let activity: ReactNode = null; if (activityStatus === "connected") { onClickScheduleIcon = () => setShowControlsAnyway((it) => !it); - activity = Connected; const now = dayjs(); const noRequiredStopSoon = @@ -183,12 +180,7 @@ const AutostopDisplay: FC = ({ // User has shown controls manually, or we should warn about a nearby required stop if (!showControlsAnyway && noRequiredStopSoon) { - return ( - <> - {activity} - - - ); + return ; } } @@ -239,24 +231,18 @@ const AutostopDisplay: FC = ({ if (tooltip) { return ( - <> - {activity} - - {display} - {controls} - - + + {display} + {controls} + ); } return ( - <> - {activity} - - {display} - {controls} - - + + {display} + {controls} + ); };