mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-09-21 08:28:58 +03:00
fix: userinfo issue after state refactor (#1061)
This commit is contained in:
parent
1034b6d517
commit
13e2537dfb
@ -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,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user