fix: userinfo issue after state refactor (#1061)
This commit is contained in:
@@ -128,6 +128,10 @@ export function DataCenterPreloader({ children }: React.PropsWithChildren) {
|
|||||||
currentWorkspace: null,
|
currentWorkspace: null,
|
||||||
currentDataCenterWorkspace: null,
|
currentDataCenterWorkspace: null,
|
||||||
dataCenterPageList: [],
|
dataCenterPageList: [],
|
||||||
|
user:
|
||||||
|
(await dataCenter.getUserInfo(
|
||||||
|
dataCenter.providers.filter(p => p.id !== 'local')[0]?.id
|
||||||
|
)) || null,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
throw promise;
|
throw promise;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ export interface UserActions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const createUserState = (): UserState => ({
|
export const createUserState = (): UserState => ({
|
||||||
|
// initialized in DataCenterLoader (restore from localStorage)
|
||||||
user: null,
|
user: null,
|
||||||
isOwner: false,
|
isOwner: false,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user