mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-18 21:19:44 +00:00
chore: update global state
This commit is contained in:
parent
874514322b
commit
2639419be3
@ -10,14 +10,14 @@ const globalService = {
|
|||||||
|
|
||||||
initialState: async () => {
|
initialState: async () => {
|
||||||
try {
|
try {
|
||||||
await userService.initialState();
|
const workspaceProfile = (await api.getWorkspaceProfile()).data;
|
||||||
|
store.dispatch(setGlobalState({ workspaceProfile }));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// do nth
|
// do nth
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const workspaceProfile = (await api.getWorkspaceProfile()).data;
|
await userService.initialState();
|
||||||
store.dispatch(setGlobalState({ workspaceProfile }));
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// do nth
|
// do nth
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user