fix: userinfo issue after state refactor (#1061)
This commit is contained in:
1 parent
1034b6d517
commit
13e2537dfb
2 files changed
+5
No files matched your search
@@ -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