fix(tui): only show org switch affordances when useful (#21054)
This commit is contained in:
parent
985663620f
commit
c6ebc7ff7c
1 changed files with 33 additions and 15 deletions
|
|
@ -54,7 +54,11 @@ export const ExperimentalRoutes = lazy(() =>
|
|||
},
|
||||
}),
|
||||
async (c) => {
|
||||
return c.json(await Config.getConsoleState())
|
||||
const [consoleState, groups] = await Promise.all([Config.getConsoleState(), Account.orgsByAccount()])
|
||||
return c.json({
|
||||
...consoleState,
|
||||
switchableOrgCount: groups.reduce((count, group) => count + group.orgs.length, 0),
|
||||
})
|
||||
},
|
||||
)
|
||||
.get(
|
||||
|
|
|
|||
Loading…
Reference in a new issue