chore: fix type issues

This commit is contained in:
Nivedin
2023-05-10 23:13:34 +05:30
committed by Andrew Bastin
parent 252fe9e5d6
commit 44ef51644e

View File

@@ -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",
}) })