chore: fix type issues
This commit is contained in:
@@ -151,19 +151,17 @@ const workspace = useReadonlyStream(workspaceStatus$, { type: "personal" })
|
|||||||
// Check if there is a teamID in the workspace, if yes, switch to team environment and select the team
|
// Check if there is a teamID in the workspace, if yes, switch to team environment and select the team
|
||||||
// If there is no teamID, switch to my environment
|
// If there is no teamID, switch to my environment
|
||||||
watch(
|
watch(
|
||||||
() => workspace.value.teamID,
|
() => workspace.value.type === "team" && workspace.value.teamID,
|
||||||
(teamID) => {
|
(teamID) => {
|
||||||
if (!teamID) {
|
if (!teamID) {
|
||||||
switchToMyEnvironments()
|
switchToMyEnvironments()
|
||||||
|
|
||||||
setSelectedEnvironmentIndex({
|
setSelectedEnvironmentIndex({
|
||||||
type: "NO_ENV_SELECTED",
|
type: "NO_ENV_SELECTED",
|
||||||
})
|
})
|
||||||
} else if (teamID) {
|
} else {
|
||||||
const team = myTeams.value?.find((t) => t.id === teamID)
|
const team = myTeams.value?.find((t) => t.id === teamID)
|
||||||
if (team) {
|
if (team) {
|
||||||
updateSelectedTeam(team)
|
updateSelectedTeam(team)
|
||||||
|
|
||||||
setSelectedEnvironmentIndex({
|
setSelectedEnvironmentIndex({
|
||||||
type: "NO_ENV_SELECTED",
|
type: "NO_ENV_SELECTED",
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user