57eb3d317b
feat: tailwindcss + mobx + apollo.
19 lines
406 B
TypeScript
19 lines
406 B
TypeScript
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();
|