diff --git a/apps/web/src/store/app/datacenter/index.tsx b/apps/web/src/store/app/datacenter/index.tsx index 3edd6d4bd5..d24c075bc8 100644 --- a/apps/web/src/store/app/datacenter/index.tsx +++ b/apps/web/src/store/app/datacenter/index.tsx @@ -128,6 +128,10 @@ export function DataCenterPreloader({ children }: React.PropsWithChildren) { currentWorkspace: null, currentDataCenterWorkspace: null, dataCenterPageList: [], + user: + (await dataCenter.getUserInfo( + dataCenter.providers.filter(p => p.id !== 'local')[0]?.id + )) || null, }); }); throw promise; diff --git a/apps/web/src/store/app/user/index.ts b/apps/web/src/store/app/user/index.ts index a147ba3e02..8076a4ec88 100644 --- a/apps/web/src/store/app/user/index.ts +++ b/apps/web/src/store/app/user/index.ts @@ -12,6 +12,7 @@ export interface UserActions { } export const createUserState = (): UserState => ({ + // initialized in DataCenterLoader (restore from localStorage) user: null, isOwner: false, });