14 lines
321 B
TypeScript
14 lines
321 B
TypeScript
type KernelMode = "web" | "desktop"
|
|
|
|
export type LoginGateState = {
|
|
platform: KernelMode
|
|
isAuthInitComplete: boolean
|
|
currentUser: unknown | null
|
|
}
|
|
|
|
export function shouldBlockAppForLogin(state: LoginGateState) {
|
|
return (
|
|
state.platform === "web" &&
|
|
(!state.isAuthInitComplete || !state.currentUser)
|
|
)
|
|
}
|