The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Provide initialSnapshot to logout recoil state update snapshot (#4929)
martmulle6a5a63acf86
diff --git a/packages/twenty-front/src/modules/auth/hooks/useAuth.ts b/packages/twenty-front/src/modules/auth/hooks/useAuth.tsindex 53bed216222..dce9f59424d 100644--- a/packages/twenty-front/src/modules/auth/hooks/useAuth.ts+++ b/packages/twenty-front/src/modules/auth/hooks/useAuth.ts@@ -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);diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/DateFieldInput.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/DateFieldInput.tsxindex 1c9b4a8692b..631d25624c1 100644--- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/DateFieldInput.tsx+++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/DateFieldInput.tsx@@ -32,7 +32,6 @@ export const DateFieldInput = ({};const handleEnter = (newDate: Nullable<Date>) => {- console.log('newDate enter', newDate);onEnter?.(() => persistDate(newDate));};