Provide initialSnapshot to logout recoil state update snapshot (#4929)
This commit is contained in:
@ -10,6 +10,7 @@ import {
|
|||||||
|
|
||||||
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';
|
||||||
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
|
import { currentWorkspaceState } from '@/auth/states/currentWorkspaceState';
|
||||||
|
import { isCurrentUserLoadedState } from '@/auth/states/isCurrentUserLoadingState.ts';
|
||||||
import { isVerifyPendingState } from '@/auth/states/isVerifyPendingState';
|
import { isVerifyPendingState } from '@/auth/states/isVerifyPendingState';
|
||||||
import { workspacesState } from '@/auth/states/workspaces';
|
import { workspacesState } from '@/auth/states/workspaces';
|
||||||
import { authProvidersState } from '@/client-config/states/authProvidersState';
|
import { authProvidersState } from '@/client-config/states/authProvidersState';
|
||||||
@ -169,9 +170,13 @@ export const useAuth = () => {
|
|||||||
const isClientConfigLoaded = snapshot
|
const isClientConfigLoaded = snapshot
|
||||||
.getLoadable(isClientConfigLoadedState)
|
.getLoadable(isClientConfigLoadedState)
|
||||||
.getValue();
|
.getValue();
|
||||||
|
const isCurrentUserLoaded = snapshot
|
||||||
|
.getLoadable(isCurrentUserLoadedState)
|
||||||
|
.getValue();
|
||||||
|
|
||||||
const initialSnapshot = emptySnapshot.map(({ set }) => {
|
const initialSnapshot = emptySnapshot.map(({ set }) => {
|
||||||
set(isClientConfigLoadedState, isClientConfigLoaded);
|
set(isClientConfigLoadedState, isClientConfigLoaded);
|
||||||
|
set(isCurrentUserLoadedState, isCurrentUserLoaded);
|
||||||
set(iconsState, iconsValue);
|
set(iconsState, iconsValue);
|
||||||
set(authProvidersState, authProvidersValue);
|
set(authProvidersState, authProvidersValue);
|
||||||
set(billingState, billing);
|
set(billingState, billing);
|
||||||
|
|||||||
@ -32,7 +32,6 @@ export const DateFieldInput = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleEnter = (newDate: Nullable<Date>) => {
|
const handleEnter = (newDate: Nullable<Date>) => {
|
||||||
console.log('newDate enter', newDate);
|
|
||||||
onEnter?.(() => persistDate(newDate));
|
onEnter?.(() => persistDate(newDate));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user