Skip to content

Commit 35453c5

Browse files
committed
fix(web): keep single-machine scope menus free of address lines
1 parent c667093 commit 35453c5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎apps/web/src/components/settings/SettingsScopeSentence.tsx‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,10 @@ function EnvironmentScopeMenu({
282282
return {
283283
value: environment.environmentId,
284284
label: primary,
285-
secondary: secondary || settingsScopeEnvironmentAddress(environment),
285+
secondary:
286+
environments.length <= 1
287+
? ""
288+
: secondary || settingsScopeEnvironmentAddress(environment),
286289
icon: (
287290
<EnvironmentMachineIcon
288291
aria-hidden
@@ -334,7 +337,9 @@ function ProjectScopeMenu({ value, groups, environments, onChange }: SettingsSco
334337
label: group.displayName,
335338
secondary:
336339
sameName.length === 0
337-
? group.workspaceRoot
340+
? environments.length > 1
341+
? group.workspaceRoot
342+
: ""
338343
: sameName.some((other) => other.machines === machines)
339344
? `${machines} · ${group.workspaceRoot}`
340345
: machines,

0 commit comments

Comments
 (0)