@@ -18,7 +18,6 @@ import {
18
18
import type { Template , Workspace } from "api/typesGenerated" ;
19
19
import { TopbarData , TopbarIcon } from "components/FullPageLayout/Topbar" ;
20
20
import { displayError , displaySuccess } from "components/GlobalSnackbar/utils" ;
21
- import { Pill } from "components/Pill/Pill" ;
22
21
import { useTime } from "hooks/useTime" ;
23
22
import { getWorkspaceActivityStatus } from "modules/workspaces/activity" ;
24
23
import {
@@ -170,11 +169,9 @@ const AutostopDisplay: FC<AutostopDisplayProps> = ({
170
169
171
170
const [ showControlsAnyway , setShowControlsAnyway ] = useState ( false ) ;
172
171
let onClickScheduleIcon : ( ( ) => void ) | undefined ;
173
- let activity : ReactNode = null ;
174
172
175
173
if ( activityStatus === "connected" ) {
176
174
onClickScheduleIcon = ( ) => setShowControlsAnyway ( ( it ) => ! it ) ;
177
- activity = < Pill type = "active" > Connected</ Pill > ;
178
175
179
176
const now = dayjs ( ) ;
180
177
const noRequiredStopSoon =
@@ -183,12 +180,7 @@ const AutostopDisplay: FC<AutostopDisplayProps> = ({
183
180
184
181
// User has shown controls manually, or we should warn about a nearby required stop
185
182
if ( ! showControlsAnyway && noRequiredStopSoon ) {
186
- return (
187
- < >
188
- { activity }
189
- < WorkspaceScheduleContainer onClickIcon = { onClickScheduleIcon } />
190
- </ >
191
- ) ;
183
+ return < WorkspaceScheduleContainer onClickIcon = { onClickScheduleIcon } /> ;
192
184
}
193
185
}
194
186
@@ -239,24 +231,18 @@ const AutostopDisplay: FC<AutostopDisplayProps> = ({
239
231
240
232
if ( tooltip ) {
241
233
return (
242
- < >
243
- { activity }
244
- < WorkspaceScheduleContainer onClickIcon = { onClickScheduleIcon } >
245
- < Tooltip title = { tooltip } > { display } </ Tooltip >
246
- { controls }
247
- </ WorkspaceScheduleContainer >
248
- </ >
234
+ < WorkspaceScheduleContainer onClickIcon = { onClickScheduleIcon } >
235
+ < Tooltip title = { tooltip } > { display } </ Tooltip >
236
+ { controls }
237
+ </ WorkspaceScheduleContainer >
249
238
) ;
250
239
}
251
240
252
241
return (
253
- < >
254
- { activity }
255
- < WorkspaceScheduleContainer onClickIcon = { onClickScheduleIcon } >
256
- { display }
257
- { controls }
258
- </ WorkspaceScheduleContainer >
259
- </ >
242
+ < WorkspaceScheduleContainer onClickIcon = { onClickScheduleIcon } >
243
+ { display }
244
+ { controls }
245
+ </ WorkspaceScheduleContainer >
260
246
) ;
261
247
} ;
262
248
0 commit comments