mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: userinfo issue after state refactor (#1061)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface UserActions {
|
||||
}
|
||||
|
||||
export const createUserState = (): UserState => ({
|
||||
// initialized in DataCenterLoader (restore from localStorage)
|
||||
user: null,
|
||||
isOwner: false,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user