2023-08-08 07:20:27 +00:00
|
|
|
// mobx lite
|
|
|
|
import { enableStaticRendering } from "mobx-react-lite";
|
|
|
|
// store imports
|
2023-08-16 11:20:39 +00:00
|
|
|
import UserStore, { IUserStore } from "./user";
|
|
|
|
import ThemeStore, { IThemeStore } from "./theme";
|
2023-08-14 13:48:38 +00:00
|
|
|
import ProjectPublishStore, { IProjectPublishStore } from "./project-publish";
|
2023-08-16 11:20:39 +00:00
|
|
|
import WorkspaceStore, { IWorkspaceStore } from "./workspace";
|
2023-08-08 07:20:27 +00:00
|
|
|
|
2023-08-14 07:44:28 +00:00
|
|
|
const isServer = typeof window === "undefined";
|
|
|
|
enableStaticRendering(isServer);
|
|
|
|
|
|
|
|
export interface IRootStore {
|
2023-08-21 10:41:08 +00:00
|
|
|
user: IUserStore;
|
|
|
|
theme: IThemeStore;
|
|
|
|
workspace: IWorkspaceStore;
|
|
|
|
projectPublish: IProjectPublishStore;
|
2023-08-14 07:44:28 +00:00
|
|
|
}
|
2023-08-08 07:20:27 +00:00
|
|
|
|
|
|
|
export class RootStore {
|
2023-08-16 11:20:39 +00:00
|
|
|
user: IUserStore;
|
|
|
|
theme: IThemeStore;
|
|
|
|
workspace: IWorkspaceStore;
|
2023-08-14 13:48:38 +00:00
|
|
|
projectPublish: IProjectPublishStore;
|
2023-08-08 07:20:27 +00:00
|
|
|
|
|
|
|
constructor() {
|
|
|
|
this.user = new UserStore(this);
|
|
|
|
this.theme = new ThemeStore(this);
|
2023-08-16 11:20:39 +00:00
|
|
|
this.workspace = new WorkspaceStore(this);
|
2023-08-14 13:48:38 +00:00
|
|
|
this.projectPublish = new ProjectPublishStore(this);
|
2023-08-08 07:20:27 +00:00
|
|
|
}
|
|
|
|
}
|