plane/web/store/issue.ts
2023-09-20 23:39:55 +05:30

36 lines
721 B
TypeScript

import { observable, action, computed, makeObservable, runInAction } from "mobx";
import { IIssue } from "types";
import { RootStore } from "./root";
export interface IIssueStore {
loader: boolean;
error: any | null;
}
class IssueStore implements IIssueStore {
loader: boolean = false;
error: any | null = null;
issues: {
[project_id: string]: {
grouped: any;
ungrouped: IIssue[];
};
} = {};
rootStore;
constructor(_rootStore: RootStore) {
makeObservable(this, {
// observable
loader: observable.ref,
error: observable.ref,
issues: observable.ref,
});
this.rootStore = _rootStore;
}
fetchIssuesWithParams() {}
}
export default IssueStore;