refactor: switch workspace after creation (#4015)

Co-authored-by: amk-dev <akash.k.mohan98@gmail.com>
This commit is contained in:
Nivedin
2024-05-09 20:28:24 +05:30
committed by GitHub
parent 5c4b651aee
commit ef1117d8cc
11 changed files with 112 additions and 149 deletions

View File

@@ -5,13 +5,24 @@ import { useStreamStatic } from "~/composables/stream"
import TeamListAdapter from "~/helpers/teams/TeamListAdapter"
import { platform } from "~/platform"
import { min } from "lodash-es"
import { TeamMemberRole } from "~/helpers/backend/graphql"
/**
* Defines a workspace and its information
*/
export type Workspace =
| { type: "personal" }
| { type: "team"; teamID: string; teamName: string }
export type PersonalWorkspace = {
type: "personal"
}
export type TeamWorkspace = {
type: "team"
teamID: string
teamName: string
role: TeamMemberRole | null | undefined
}
export type Workspace = PersonalWorkspace | TeamWorkspace
export type WorkspaceServiceEvent = {
type: "managed-team-list-adapter-polled"