Fix userload on signout

This commit is contained in:
Charles Bochet
2024-04-05 21:01:03 +02:00
parent 9f2c9ee76e
commit 0a9c79b3b3
2 changed files with 9 additions and 2 deletions

View File

@ -14,6 +14,7 @@ import { isVerifyPendingState } from '@/auth/states/isVerifyPendingState';
import { workspacesState } from '@/auth/states/workspaces';
import { authProvidersState } from '@/client-config/states/authProvidersState';
import { billingState } from '@/client-config/states/billingState';
import { isClientConfigLoadedState } from '@/client-config/states/isClientConfigLoadedState';
import { isDebugModeState } from '@/client-config/states/isDebugModeState';
import { isSignInPrefilledState } from '@/client-config/states/isSignInPrefilledState';
import { supportChatState } from '@/client-config/states/supportChatState';
@ -165,8 +166,12 @@ export const useAuth = () => {
const supportChat = snapshot.getLoadable(supportChatState).getValue();
const telemetry = snapshot.getLoadable(telemetryState).getValue();
const isDebugMode = snapshot.getLoadable(isDebugModeState).getValue();
const isClientConfigLoaded = snapshot
.getLoadable(isClientConfigLoadedState)
.getValue();
const initialSnapshot = emptySnapshot.map(({ set }) => {
set(isClientConfigLoadedState, isClientConfigLoaded);
set(iconsState, iconsValue);
set(authProvidersState, authProvidersValue);
set(billingState, billing);