import { action, makeAutoObservable, observable } from 'mobx'; import { Project } from './generated/graphql'; export class GlobalState { @observable projects?: Project[]; @observable currentProject?: Project; constructor() { makeAutoObservable(this); } @action setCurrentProject(project: Project) { this.currentProject = project; } } export const globalState = new GlobalState();