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