mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-07 13:42:34 +00:00
chore: hide sign up button when disabled
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import * as api from "../helpers/api";
|
||||
import store from "../stores";
|
||||
import { setGlobalState } from "../stores/modules/global";
|
||||
import userService from "./userService";
|
||||
@ -8,15 +9,18 @@ const globalService = {
|
||||
},
|
||||
|
||||
initialState: async () => {
|
||||
const defaultGlobalState = {};
|
||||
|
||||
try {
|
||||
await userService.initialState();
|
||||
} catch (error) {
|
||||
// do nth
|
||||
}
|
||||
|
||||
store.dispatch(setGlobalState(defaultGlobalState));
|
||||
try {
|
||||
const workspaceProfile = (await api.getWorkspaceProfile()).data;
|
||||
store.dispatch(setGlobalState({ workspaceProfile }));
|
||||
} catch (error) {
|
||||
// do nth
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user